mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-08-09 20:24:09 +00:00
Fix pako imports for firefox.
This commit is contained in:
@@ -12,7 +12,7 @@ export const compressGzip = async data => {
|
|||||||
|
|
||||||
return bytes;
|
return bytes;
|
||||||
} else {
|
} else {
|
||||||
const pako = require("pako");
|
const pako = await import("pako");
|
||||||
return pako.gzip(data);
|
return pako.gzip(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -30,7 +30,7 @@ export const decompressGzip = async compressedData => {
|
|||||||
|
|
||||||
return new TextDecoder().decode(bytes);
|
return new TextDecoder().decode(bytes);
|
||||||
} else {
|
} else {
|
||||||
const pako = require("pako");
|
const pako = await import("pako");
|
||||||
const inflated = pako.inflate(compressedData, { to: "string" });
|
const inflated = pako.inflate(compressedData, { to: "string" });
|
||||||
|
|
||||||
return inflated;
|
return inflated;
|
||||||
|
Reference in New Issue
Block a user