resolving conflicts

This commit is contained in:
programminglaboratorys 2024-06-08 13:21:05 +03:00
parent 4b337e30ff
commit f5f6f56738

View file

@ -47,19 +47,11 @@ export async function loadLazyChunks() {
for (const id of chunkIds) { for (const id of chunkIds) {
if (wreq.u(id) == null || wreq.u(id) === "undefined.js") continue; if (wreq.u(id) == null || wreq.u(id) === "undefined.js") continue;
<<<<<<< HEAD
const isWasm = await fetch(wreq.p + wreq.u(id))
.then(r => r.text())
.then(t => (IS_WEB && t.includes(".module.wasm")) || !t.includes("(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push"));
if (isWasm && IS_WEB) {
=======
const isWorkerAsset = await fetch(wreq.p + wreq.u(id)) const isWorkerAsset = await fetch(wreq.p + wreq.u(id))
.then(r => r.text()) .then(r => r.text())
.then(t => t.includes("importScripts(")); .then(t => t.includes("importScripts("));
if (isWorkerAsset) { if (isWorkerAsset) {
>>>>>>> dev
invalidChunks.add(id); invalidChunks.add(id);
invalidChunkGroup = true; invalidChunkGroup = true;
continue; continue;
@ -157,15 +149,6 @@ export async function loadLazyChunks() {
}); });
await Promise.all(chunksLeft.map(async id => { await Promise.all(chunksLeft.map(async id => {
<<<<<<< HEAD
const isWasm = await fetch(wreq.p + wreq.u(id))
.then(r => r.text())
.then(t => (IS_WEB && t.includes(".module.wasm")) || !t.includes("(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push"));
// Loads and requires a chunk
if (!isWasm) {
await wreq.e(id as any);
=======
const isWorkerAsset = await fetch(wreq.p + wreq.u(id)) const isWorkerAsset = await fetch(wreq.p + wreq.u(id))
.then(r => r.text()) .then(r => r.text())
.then(t => t.includes("importScripts(")); .then(t => t.includes("importScripts("));
@ -175,7 +158,6 @@ export async function loadLazyChunks() {
await wreq.e(id as any); await wreq.e(id as any);
// Technically, the id of the chunk does not match the entry point // Technically, the id of the chunk does not match the entry point
// But, still try it because we have no way to get the actual entry point // But, still try it because we have no way to get the actual entry point
>>>>>>> dev
if (wreq.m[id]) wreq(id as any); if (wreq.m[id]) wreq(id as any);
} }
})); }));