Skip to content

Commit

Permalink
[PD-254370] : bv-fetch catch clear issue resolved (#142)
Browse files Browse the repository at this point in the history
* [PD-254370] : bv-fetch catch clear issue resolved

* Release 2.9.4
  • Loading branch information
visheshsanghani authored Sep 20, 2024
1 parent d057b98 commit a7af685
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/bvFetch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ module.exports = function BvFetch ({ shouldCache, cacheName, cacheLimit }) {
// Check if response is available in cache
const newPromise = this.fetchFromCache(cacheKey)
.then((cachedResponse) => {
if (!cachedResponse) {
this.cachedUrls.delete(cacheKey)
return Promise.resolve(null);
}
// If response found in cache, return it
if (cachedResponse) {
return cachedResponse;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bv-ui-core",
"version": "2.9.3",
"version": "2.9.4",
"license": "Apache 2.0",
"description": "Bazaarvoice UI-related JavaScript",
"repository": {
Expand Down

0 comments on commit a7af685

Please sign in to comment.