fetch mask file fix on production

remotes/origin/HEAD
sunhao03 3 years ago
parent 4251b94b1f
commit 71862538b7

@ -85,7 +85,7 @@ let MaskV2: Uint8Array = new Uint8Array(0);
async function LoadMaskV2(): Promise<boolean> {
try {
const resp = await fetch("./static/kgm.mask", {method: "GET"})
const resp = await fetch(process.env.NODE_ENV !== 'production'?"./static/kgm.mask":"../static/kgm.mask", {method: "GET"})
MaskV2 = new Uint8Array(await resp.arrayBuffer());
return true
} catch (e) {

Loading…
Cancel
Save