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 dc4398c commit 94e6fadCopy full SHA for 94e6fad
1 file changed
lib/internal/blob.js
@@ -78,6 +78,7 @@ let ReadableStream;
78
let URL;
79
80
const enc = new TextEncoder();
81
+const dec = new TextDecoder();
82
83
// Yes, lazy loading is annoying but because of circular
84
// references between the url, internal/blob, and buffer
@@ -310,8 +311,6 @@ class Blob {
310
311
async text() {
312
if (!isBlob(this))
313
throw new ERR_INVALID_THIS('Blob');
-
314
- const dec = new TextDecoder();
315
return dec.decode(await this.arrayBuffer());
316
}
317
0 commit comments