Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Jan 6, 2024
1 parent 21f08bc commit 816f7c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/kuromoji.patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ BrowserDictionaryLoader.prototype.loadArrayBuffer = async function (url, callbac
if (!response.ok) {
return callback(response.statusText, null);
}
const arraybuffer = await response.arrayBuffer();
const rawArrayBuffer = await response.arrayBuffer();
// decompress gzipped dictionary
const typedArray = await Compressor.decompress(new Uint8Array(arraybuffer), "gzip");
const decompressedArrayBuffer = typedArray.buffer;
const decompressedUint8Array = await Compressor.decompress(new Uint8Array(rawArrayBuffer), "gzip");
const decompressedArrayBuffer = decompressedUint8Array.buffer;
return stroage.set(fixedURL, decompressedArrayBuffer).then(() => {
deferred.resolve(decompressedArrayBuffer);
callback(null, decompressedArrayBuffer);
Expand Down

0 comments on commit 816f7c4

Please sign in to comment.