mirror of
https://github.com/JeremyLikness/vanillajs-deck
synced 2024-12-04 19:27:37 +00:00
Fix TTL calculation
This commit is contained in:
parent
e2d52d32e9
commit
0b60742e8a
3
pwa.js
3
pwa.js
@ -95,7 +95,7 @@ class Pwa {
|
||||
if (typeof url === 'string') {
|
||||
const extension = this.getFileExtension(url);
|
||||
return ~this.TTL_EXCEPTIONS.indexOf(extension) ?
|
||||
this.MAX_TTL : null;
|
||||
null : this.MAX_TTL;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -224,6 +224,7 @@ class Pwa {
|
||||
|
||||
/**
|
||||
* Sadly this is a pathetic hack to workaround JsDoc limitations
|
||||
* Casting what the IDE thinks is Window to service worker scope
|
||||
* @type {any} */
|
||||
const _self = self;
|
||||
var pwa = new Pwa(/**@type {ServiceWorkerGlobalScope}*/(_self));
|
||||
|
Loading…
Reference in New Issue
Block a user