Skip to content

Commit

Permalink
Fix pako imports for firefox.
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMasterK committed Sep 11, 2023
1 parent ee20e0c commit a5c0d80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/compressionUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const compressGzip = async data => {

return bytes;
} else {
const pako = require("pako");
const pako = await import("pako");
return pako.gzip(data);
}
};
Expand All @@ -30,7 +30,7 @@ export const decompressGzip = async compressedData => {

return new TextDecoder().decode(bytes);
} else {
const pako = require("pako");
const pako = await import("pako");
const inflated = pako.inflate(compressedData, { to: "string" });

return inflated;
Expand Down

0 comments on commit a5c0d80

Please sign in to comment.