| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 281fd7a commit 725be0e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,6 +78,7 @@ let ReadableStream; | |||
| 78 | 78 | let URL; | |
| 79 | 79 | ||
| 80 | 80 | const enc = new TextEncoder(); | |
| 81 | + let dec; | ||
| 81 | 82 | ||
| 82 | 83 | // Yes, lazy loading is annoying but because of circular | |
| 83 | 84 | // references between the url, internal/blob, and buffer | |
@@ -311,7 +312,8 @@ class Blob { | |||
| 311 | 312 | if (!isBlob(this)) | |
| 312 | 313 | throw new ERR_INVALID_THIS('Blob'); | |
| 313 | 314 | ||
| 314 | - const dec = new TextDecoder(); | ||
| 315 | + dec ??= new TextDecoder(); | ||
| 316 | + | ||
| 315 | 317 | return dec.decode(await this.arrayBuffer()); | |
| 316 | 318 | } | |
| 317 | 319 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments