app: refactor

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/807/merge
Varun Patil 2023-10-02 18:00:49 -07:00
parent 1cb428b489
commit 3435ab35c9
1 changed files with 4 additions and 7 deletions

View File

@ -310,13 +310,10 @@ export default defineComponent({
},
async beforeMount() {
if ('serviceWorker' in navigator) {
// Check if dev instance
if (window.location.hostname === 'localhost') {
// Disable on dev instances
console.warn('Service Worker is not enabled on localhost.');
return;
}
} else if ('serviceWorker' in navigator) {
// Get the config before loading
const previousVersion = staticConfig.getSync('version');