We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ac2e8b commit 8020ad2Copy full SHA for 8020ad2
lib/internal/webstreams/encoding.js
@@ -21,6 +21,7 @@ const { customInspect } = require('internal/webstreams/util');
21
const {
22
codes: {
23
ERR_INVALID_THIS,
24
+ ERR_INVALID_ARG_TYPE,
25
},
26
} = require('internal/errors');
27
@@ -134,7 +135,7 @@ class TextDecoderStream {
134
135
this.#transform = new TransformStream({
136
transform: (chunk, controller) => {
137
if (chunk === undefined) {
- throw new ERR_INVALID_THIS('TextDecoderStream');
138
+ throw new ERR_INVALID_ARG_TYPE('chunk', 'string', chunk);
139
}
140
const value = this.#handle.decode(chunk, { stream: true });
141
if (value)
0 commit comments