Don't use the SW when in an iFrame.
This is cheap sandstorm detection. I need a better way but this works for now.
This commit is contained in:
parent
923320bb11
commit
d84e756ac4
@ -20,7 +20,7 @@ function go() {
|
|||||||
router.start('home');
|
router.start('home');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator && window.top === window) {
|
||||||
navigator.serviceWorker
|
navigator.serviceWorker
|
||||||
.register('/assets/sw.bundle.js', { scope: '/' })
|
.register('/assets/sw.bundle.js', { scope: '/' })
|
||||||
.then(go)
|
.then(go)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user