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
9b99636231
commit
06e64dc730
@ -20,7 +20,7 @@ function go() {
|
||||
router.start('home');
|
||||
}
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
if ('serviceWorker' in navigator && window.top === window) {
|
||||
navigator.serviceWorker
|
||||
.register('/assets/sw.bundle.js', { scope: '/' })
|
||||
.then(go)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user