Skip to content

Commit

Permalink
Fix lastResult.deref is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Dec 18, 2023
1 parent 50c7a56 commit 8ddbb52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/weakMapMemoize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export function weakMapMemoize<Func extends AnyFunction>(
terminatedNode.s = TERMINATED

if (resultEqualityCheck) {
const lastResultValue = lastResult?.deref() ?? lastResult
const lastResultValue = lastResult?.deref?.() ?? lastResult
if (
lastResultValue != null &&
resultEqualityCheck(lastResultValue as ReturnType<Func>, result)
Expand Down

0 comments on commit 8ddbb52

Please sign in to comment.