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:
parent
ee20e0ccdf
commit
a5c0d8007c
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user