Skip to content

Commit

Permalink
Explicitly check event.request
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffposnick committed Mar 5, 2019
1 parent ea248e7 commit 1b0a5fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/workbox-broadcast-update/BroadcastCacheUpdate.mjs
Expand Up @@ -98,7 +98,7 @@ class BroadcastCacheUpdate {
// In the case of a navigation request, the requesting page will likely
// not have loaded its JavaScript in time to recevied the update
// notification, so we defer it until ready (or we timeout waiting).
if (event && event.request.mode === 'navigate') {
if (event && event.request && event.request.mode === 'navigate') {
if (process.env.NODE_ENV !== 'production') {
logger.debug(`Original request was a navigation request, ` +
`waiting for a ready message from the window`, event.request);
Expand Down

0 comments on commit 1b0a5fa

Please sign in to comment.