1
0
mirror of https://github.com/TeamPiped/Piped.git synced 2024-12-12 21:30:27 +05:30

Fix pako imports for firefox.

This commit is contained in:
Kavin 2023-02-20 15:57:30 +00:00
parent ee20e0ccdf
commit a5c0d8007c
No known key found for this signature in database
GPG Key ID: 6E4598CA5C92C41F

View File

@ -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;