fetch mask file fix on production

This commit is contained in:
sunhao03 2021-08-07 22:13:00 +08:00
parent 4251b94b1f
commit 71862538b7
1 changed files with 1 additions and 1 deletions

View File

@ -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) {