From a1680fc6482a82dcff6c5f5af390ee4212264eea Mon Sep 17 00:00:00 2001 From: Zak Burke Date: Mon, 30 Oct 2023 16:50:02 -0400 Subject: [PATCH] correct compare event.origin, self.location.origin --- src/service-worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service-worker.js b/src/service-worker.js index dadcc0be5..f036a2772 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -404,7 +404,7 @@ self.addEventListener('message', (event) => { // only accept events whose origin matches this window's origin, // i.e. if this is a same-origin event. Browsers allow cross-origin // message exchange, but we're only interested in the events we control. - if ((!event.origin) || (!event.origin === self.location.origin)) { + if ((!event.origin) || (event.origin !== self.location.origin)) { return; }