fix: remove checking the method for kernel -> sw messages
This commit is contained in:
parent
34da5bdd21
commit
6e1e244f0e
|
@ -136,17 +136,10 @@ function handleMessage(event: MessageEvent) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.source === kernelIframe?.contentWindow) {
|
if (event.source === kernelIframe?.contentWindow && event.data.sw) {
|
||||||
if (
|
delete event.data.sw;
|
||||||
["response", "queryUpdate", "responseNonce", "responseUpdate"].includes(
|
serviceWorker?.postMessage(event.data);
|
||||||
event.data.method,
|
return;
|
||||||
) &&
|
|
||||||
event.data.sw
|
|
||||||
) {
|
|
||||||
delete event.data.sw;
|
|
||||||
serviceWorker?.postMessage(event.data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (FROM_SW) {
|
if (FROM_SW) {
|
||||||
if (["moduleCall", "queryUpdate", "response"].includes(event.data.method)) {
|
if (["moduleCall", "queryUpdate", "response"].includes(event.data.method)) {
|
||||||
|
|
Loading…
Reference in New Issue