Skip to content

Commit

Permalink
correct compare event.origin, self.location.origin
Browse files Browse the repository at this point in the history
  • Loading branch information
zburke committed Oct 30, 2023
1 parent 41cbed1 commit a1680fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a1680fc

Please sign in to comment.