Skip to content

Commit

Permalink
fix: with latest jotai
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed May 12, 2024
1 parent f12c315 commit 1f29e61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/atomWithCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function atomWithCache<Value>(
AnyAtomValue
> = atom(
async (get, { setSelf: writeGetter, ...opts }): Promise<Awaited<Value>> => {
await Promise.resolve();
const index = cache.findIndex((item) =>
Array.from(item[2]).every(([a, v]) => is(v, writeGetter(a))),
);
Expand Down

0 comments on commit 1f29e61

Please sign in to comment.