Browse Source

fetch mask file fix on production

20230320
sunhao03 3 years ago
parent
commit
71862538b7
  1. 2
      src/decrypt/kgm.ts

2
src/decrypt/kgm.ts

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