Skip to content

Commit a956644

Browse files
committed
Modify vendored source of @stardazed/streams-text-encoding
1 parent a2698d3 commit a956644

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

vendor/streams-text-encoding/text-decoder-stream.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Source: https://github.com/stardazed/sd-streams
1+
// Adapted from https://github.com/stardazed/sd-streams
22
//
33
// MIT License
44
//
@@ -71,8 +71,9 @@ var TextDecodeTransformer = class {
7171
};
7272
var TextDecoderStream = class {
7373
constructor(label, options) {
74-
this[decDecoder] = new TextDecoder(label, options);
75-
this[decTransform] = new TransformStream(new TextDecodeTransformer(this[decDecoder]));
74+
const decoder = new TextDecoder(label || "utf-8", options || {});
75+
this[decDecoder] = decoder;
76+
this[decTransform] = new TransformStream(new TextDecodeTransformer(decoder));
7677
}
7778
get encoding() {
7879
return this[decDecoder].encoding;

0 commit comments

Comments
 (0)