Skip to content

Commit

Permalink
fix: PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Dec 22, 2020
1 parent 728e982 commit 43223b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions packages/cli/sw/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ export function setupRouting() {

setCatchHandler(({ event }) => {
if (isNav(event)) {
return (
caches.match(getCacheKeyForURL('/200.html')) ||
caches.match(getCacheKeyForURL('/index.html'))
return caches.match(
getCacheKeyForURL('/200.html') || getCacheKeyForURL('/index.html')
);
}
return Response.error();
Expand Down
4 changes: 1 addition & 3 deletions packages/cli/tests/service-worker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ describe('preact service worker tests', () => {
res.text()
);
// eslint-disable-next-line no-useless-escape
expect(swText).toContain(
'caches.match(T("/200.html"))||caches.match(T("/index.html"))'
);
expect(swText).toContain('caches.match(T("/200.html")||T("/index.html"))');
const page = await browser.newPage();
await page.setCacheEnabled(false);
await page.goto('http://localhost:3000', {
Expand Down

0 comments on commit 43223b5

Please sign in to comment.