fix: remove checking the method for kernel -> sw messages

This commit is contained in:
Derrick Hammer 2023-09-16 14:26:05 -04:00
parent 34da5bdd21
commit 6e1e244f0e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 11 deletions

View File

@ -136,18 +136,11 @@ function handleMessage(event: MessageEvent) {
return;
}
if (event.source === kernelIframe?.contentWindow) {
if (
["response", "queryUpdate", "responseNonce", "responseUpdate"].includes(
event.data.method,
) &&
event.data.sw
) {
if (event.source === kernelIframe?.contentWindow && event.data.sw) {
delete event.data.sw;
serviceWorker?.postMessage(event.data);
return;
}
}
if (FROM_SW) {
if (["moduleCall", "queryUpdate", "response"].includes(event.data.method)) {
kernelIframe?.contentWindow?.postMessage(