Skip to content

Commit

Permalink
Ensure falsy values are returned from cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangoree committed Sep 17, 2024
1 parent 765669d commit 49c4e1a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async function getOrSet<TValue>({
callback: () => Promise<TValue> | TValue;
}): Promise<TValue> {
let value = cache.get(key);
if (value) {
if (typeof value !== 'undefined') {
return value;
}

Expand Down

0 comments on commit 49c4e1a

Please sign in to comment.