Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.map(url => {
const hash = this.staticManifest.urls[url];
const previousHash = previous.staticManifest.urls[url];
if (previousHash === hash) {
LOG.technical(`update(${this.cacheKey}, ${url}): no need to refresh ${url} in the cache`);
return copyExistingOrFetchOp(previous.worker, this.worker, url, this.cacheKey);
} else {
LOG.technical(`update(${this.cacheKey}, ${url}): caching from network`);
return cacheFromNetworkOp(this.worker, url, this.cacheKey, shouldCacheBust(url));
}
})
);