fix(pwa) remove window.load event handler for pwa registrator
This commit is contained in:
parent
ab5c8d49c3
commit
d854b2cd3d
|
@ -1,5 +1,4 @@
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
window.addEventListener('load', () => {
|
|
||||||
navigator.serviceWorker
|
navigator.serviceWorker
|
||||||
.register('pwa-worker.js')
|
.register('pwa-worker.js')
|
||||||
.then(reg => {
|
.then(reg => {
|
||||||
|
@ -8,5 +7,4 @@ if ('serviceWorker' in navigator) {
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue