fix: remove checking the method for kernel -> sw messages
This commit is contained in:
parent
34da5bdd21
commit
6e1e244f0e
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue