Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/internal/webstreams/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ class TextDecoderStream {
this.#handle = new TextDecoder(encoding, options);
this.#transform = new TransformStream({
transform: (chunk, controller) => {
if (chunk === undefined) {
throw new ERR_INVALID_THIS('TextDecoderStream');
}
const value = this.#handle.decode(chunk, { stream: true });
if (value)
controller.enqueue(value);
Expand Down
7 changes: 0 additions & 7 deletions test/wpt/status/encoding.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@
"streams/decode-utf8.any.js": {
"requires": ["small-icu"]
},
"streams/decode-bad-chunks.any.js": {
"fail": {
"expected": [
"chunk of type undefined should error the stream"
]
}
},
"streams/decode-non-utf8.any.js": {
"requires": ["full-icu"]
},
Expand Down