bv-ui-core 2.9.3 → 2.9.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,3 @@
1
-
2
1
  /**
3
2
  * @fileOverview
4
3
  * Provides api response caching utilties
@@ -133,7 +132,10 @@ module.exports = function BvFetch ({ shouldCache, cacheName, cacheLimit }) {
133
132
  .then((cache) => {
134
133
  return cache.match(cacheKey)
135
134
  .then((cachedResponse) => {
136
-
135
+ if (!cachedResponse) {
136
+ this.cachedUrls.delete(cacheKey)
137
+ return Promise.resolve(null);
138
+ }
137
139
  const cachedTime = cachedResponse.headers.get('X-Bazaarvoice-Cached-Time');
138
140
  const ttl = cachedResponse.headers.get('Cache-Control').match(/max-age=(\d+)/)[1];
139
141
  const currentTimestamp = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bv-ui-core",
3
- "version": "2.9.3",
3
+ "version": "2.9.6",
4
4
  "license": "Apache 2.0",
5
5
  "description": "Bazaarvoice UI-related JavaScript",
6
6
  "repository": {