Skip to content

Commit

Permalink
fix: 修复未等待异步任务问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Stan-BK committed Jan 1, 2024
1 parent cb341af commit d47c3df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/getSWR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function SWR() {
swr = await navigator.serviceWorker.getRegistration(SW) as ServiceWorkerRegistration

if (swr) {
swr.unregister()
await swr.unregister()
}
swr = await navigator.serviceWorker.register(SW, {
type: 'module'
Expand Down

0 comments on commit d47c3df

Please sign in to comment.