Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit 71ca43e

Browse files
Improve service worker error detection
The previous move to async/await in 8e37e3 disabled error propagation when the service worker API is accessible, but registration fails.
1 parent 8844683 commit 71ca43e

File tree

1 file changed

+2
-2
lines changed
  • packages/builder/src/logic/io/preview

1 file changed

+2
-2
lines changed

packages/builder/src/logic/io/preview/worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ export default async (store) => {
2525
// Prepopulate cache with library files
2626
await prePopulateCache()
2727
} catch (error) {
28-
console.log('Error during preview worker setup', error)
28+
throw error
2929
}
3030
} else {
31-
return new Error('Service workers not available')
31+
throw new Error('Service workers not available')
3232
}
3333
}

0 commit comments

Comments
 (0)