From 0b60742e8adf7c4abde2e87d072be2b796a69fef Mon Sep 17 00:00:00 2001 From: Jeremy Likness Date: Thu, 5 Dec 2019 10:51:21 -0800 Subject: [PATCH] Fix TTL calculation --- pwa.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pwa.js b/pwa.js index 8d7738c..6bd76b5 100644 --- a/pwa.js +++ b/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));