Skip to content

Commit

Permalink
Ensure Falsy values are returned from cache (#81)
Browse files Browse the repository at this point in the history
* Ensure falsy values are returned from cache

* Add changeset
  • Loading branch information
ryangoree authored Sep 17, 2024
1 parent 765669d commit afa0069
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/honest-walls-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@delvtech/evm-client": patch
---

Ensure Falsy values don't result in cache misses.
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 afa0069

Please sign in to comment.