mirror of
https://github.com/GuerillaStudio/souvenir.git
synced 2025-02-23 19:10:13 +00:00
lint fix
This commit is contained in:
parent
2c69a199ee
commit
74f3df8c01
2 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ import store from '~/src/store'
|
||||||
export default () => {
|
export default () => {
|
||||||
if ('serviceWorker' in navigator && process.env.NODE_ENV === 'production') {
|
if ('serviceWorker' in navigator && process.env.NODE_ENV === 'production') {
|
||||||
navigator.serviceWorker
|
navigator.serviceWorker
|
||||||
.register(new URL('~/src/service-worker.js', import.meta.url), {type: 'module'})
|
.register(new URL('~/src/service-worker.js', import.meta.url), { type: 'module' })
|
||||||
.then(registration => {
|
.then(registration => {
|
||||||
registration.onupdatefound = () => {
|
registration.onupdatefound = () => {
|
||||||
const installingWorker = registration.installing
|
const installingWorker = registration.installing
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { manifest, version } from '@parcel/service-worker'
|
import { manifest, version } from '@parcel/service-worker'
|
||||||
|
|
||||||
async function install() {
|
async function install () {
|
||||||
const cache = await caches.open(version)
|
const cache = await caches.open(version)
|
||||||
await cache.addAll(manifest)
|
await cache.addAll(manifest)
|
||||||
}
|
}
|
||||||
|
|
||||||
addEventListener('install', e => e.waitUntil(install()))
|
addEventListener('install', e => e.waitUntil(install()))
|
||||||
|
|
||||||
async function activate() {
|
async function activate () {
|
||||||
const keys = await caches.keys()
|
const keys = await caches.keys()
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|
Loading…
Add table
Reference in a new issue