fix: use FROM_SW

This commit is contained in:
Derrick Hammer 2023-09-11 08:40:45 -04:00
parent a54565ecd0
commit d51ebe91ba
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ function handleMessage(event: MessageEvent) {
return; return;
} }
} }
if (event.source === serviceWorker) { if (FROM_SW) {
if (["moduleCall", "queryUpdate", "response"].includes(event.data.method)) { if (["moduleCall", "queryUpdate", "response"].includes(event.data.method)) {
kernelIframe?.contentWindow?.postMessage( kernelIframe?.contentWindow?.postMessage(
{ ...event.data, sw: true }, { ...event.data, sw: true },