fix: something

This commit is contained in:
TrèsAbhi committed 2024-02-07 13:32:23 -06:00
1 parent 84300389f9
commit 846c2a4962
2 files changed
+5 -7

No files matched your search

+3 -5
View File
@@ -1,9 +1,7 @@
import { superDecompress } from './superDecompress';
export async function fetchCdonLz4<Type>(url: string) {
return await fetch(url, {
cache: 'no-cache',
}).then(async (response) => {
return superDecompress(Buffer.from(await response.arrayBuffer())) as Type;
});
return await fetch(url, { cache: 'no-cache' })
.then((response) => response.arrayBuffer())
.then((buffer) => superDecompress<Type>(new Uint8Array(buffer)));
}