patch oko teksta PDFa i UI tablica
This commit is contained in:
@@ -85,6 +85,16 @@ const isDev = import.meta.env.DEV;
|
||||
navigator.serviceWorker.register('/service-worker.js').catch(function (error) {
|
||||
console.error('Service worker registration failed:', error);
|
||||
});
|
||||
window.addEventListener('online', function () {
|
||||
navigator.serviceWorker.ready
|
||||
.then(function (registration) {
|
||||
if (!registration.active) return;
|
||||
registration.active.postMessage('FLUSH_WRITE_QUEUE');
|
||||
})
|
||||
.catch(function () {
|
||||
// no-op, SW may not be ready yet
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -94,7 +104,7 @@ const isDev = import.meta.env.DEV;
|
||||
const keys = await caches.keys();
|
||||
await Promise.all(
|
||||
keys
|
||||
.filter((key) => key.startsWith('erp-shell-'))
|
||||
.filter((key) => key.startsWith('erp-shell-') || key.startsWith('erp-api-'))
|
||||
.map((key) => caches.delete(key))
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user