Skip to content

Commit

Permalink
Fix offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ylfyt committed Mar 3, 2024
1 parent 4f3bb79 commit 98bd2ca
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ const ASSETS = [
...files.filter(el => !el.includes(".nojekyll"))
];

console.log(ASSETS, build, files);

self.addEventListener('install', e => {
const addFileToCache = async () => {
const cache = await caches.open(CACHE_NAME);
Expand All @@ -39,10 +37,6 @@ self.addEventListener('fetch', e => {

const getResponse = async () => {
const url = new URL(e.request.url);
if (url.pathname === "/" || url.pathname === "/pdf-splitter" || url.pathname === "/pdf-splitter/") {
console.log('URL', url);
}

const cache = await caches.open(CACHE_NAME);

if (ASSETS.includes(url.pathname)) {
Expand Down

0 comments on commit 98bd2ca

Please sign in to comment.