Skip to content

Commit

Permalink
fix in condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bandinopla committed Oct 7, 2024
1 parent 7e48f1c commit b58598e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ registerRoute(
// If this isn't a navigation, skip.
if (request.mode !== 'navigate') {
return false;
}
}

if( excludeRoutes.includes(url.pathname) )
{
if (excludeRoutes.some(route => url.pathname.startsWith(route))) {
return false;
}

Expand Down

0 comments on commit b58598e

Please sign in to comment.