From a5c0d8007ce8d1c2a2ddfd5be828186c5c20ce18 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 20 Feb 2023 15:57:30 +0000 Subject: [PATCH] Fix pako imports for firefox. --- src/utils/compressionUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/compressionUtils.js b/src/utils/compressionUtils.js index 29f1c88f5c..86ed78f5a5 100644 --- a/src/utils/compressionUtils.js +++ b/src/utils/compressionUtils.js @@ -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); } }; @@ -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;