Skip to content

Commit a5c0d80

Browse files
committed
Fix pako imports for firefox.
1 parent ee20e0c commit a5c0d80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/compressionUtils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const compressGzip = async data => {
1212

1313
return bytes;
1414
} else {
15-
const pako = require("pako");
15+
const pako = await import("pako");
1616
return pako.gzip(data);
1717
}
1818
};
@@ -30,7 +30,7 @@ export const decompressGzip = async compressedData => {
3030

3131
return new TextDecoder().decode(bytes);
3232
} else {
33-
const pako = require("pako");
33+
const pako = await import("pako");
3434
const inflated = pako.inflate(compressedData, { to: "string" });
3535

3636
return inflated;

0 commit comments

Comments
 (0)