lib/generators/serviceworker/templates/serviceworker.js in serviceworker-rails-0.5.2 vs lib/generators/serviceworker/templates/serviceworker.js in serviceworker-rails-0.5.3
- old
+ new
@@ -27,10 +27,10 @@
return Promise.all(
cacheNames.filter(function(cacheName) {
// Return true if you want to remove this cache,
// but remember that caches are shared across
// the whole origin
- return key.indexOf(CACHE_VERSION) !== 0;
+ return cacheName.indexOf(CACHE_VERSION) !== 0;
}).map(function(cacheName) {
return caches.delete(cacheName);
})
);
})