diff options
tests - start migrating mascara tests to karma
Diffstat (limited to 'mascara/src/ui.js')
-rw-r--r-- | mascara/src/ui.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mascara/src/ui.js b/mascara/src/ui.js index 5f9be542f..5662270c1 100644 --- a/mascara/src/ui.js +++ b/mascara/src/ui.js @@ -44,13 +44,18 @@ background.on('ready', (sw) => { background.removeListener('updatefound', connectApp) connectApp(sw) }) -background.on('updatefound', () => window.location.reload()) +background.on('updatefound', windowReload) background.startWorker() .then(() => { setTimeout(() => { const appContent = document.getElementById(`app-content`) - if (!appContent.children.length) window.location.reload() + if (!appContent.children.length) windowReload() }, 2000) }) console.log('hello from MetaMascara ui!') + +function windowReload() { + if (window.METAMASK_SKIP_RELOAD) return + window.location.reload() +} |