Skip to content

Commit

Permalink
fix: wrong changes reverting prompt logic (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Feb 29, 2024
1 parent 9652a0b commit 98518a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/build/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function registerSW(options: RegisterSWOptions = {}) {
window.location.reload()
})
wb.addEventListener('installed', (event) => {
if (event.isUpdate === false) {
if (!event.isUpdate) {
onOfflineReady?.()
}
});
Expand All @@ -83,7 +83,7 @@ export function registerSW(options: RegisterSWOptions = {}) {
// that will reload the page as soon as the previously waiting
// service worker has taken control.
wb?.addEventListener('controlling', (event) => {
if (!event.isUpdate)
if (event.isUpdate)
window.location.reload()
})

Expand Down

0 comments on commit 98518a6

Please sign in to comment.