Skip to content

Commit a7af685

Browse files
[PD-254370] : bv-fetch catch clear issue resolved (#142)
* [PD-254370] : bv-fetch catch clear issue resolved * Release 2.9.4
1 parent d057b98 commit a7af685

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

lib/bvFetch/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ module.exports = function BvFetch ({ shouldCache, cacheName, cacheLimit }) {
167167
// Check if response is available in cache
168168
const newPromise = this.fetchFromCache(cacheKey)
169169
.then((cachedResponse) => {
170+
if (!cachedResponse) {
171+
this.cachedUrls.delete(cacheKey)
172+
return Promise.resolve(null);
173+
}
170174
// If response found in cache, return it
171175
if (cachedResponse) {
172176
return cachedResponse;

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bv-ui-core",
3-
"version": "2.9.3",
3+
"version": "2.9.4",
44
"license": "Apache 2.0",
55
"description": "Bazaarvoice UI-related JavaScript",
66
"repository": {

0 commit comments

Comments
 (0)