Skip to content

Commit

Permalink
Merge pull request #671 from aryaemami59/fix-lastResult-deref
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson authored Dec 18, 2023
2 parents 50c7a56 + 8ddbb52 commit 9fcb71a
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 9fcb71a

Please sign in to comment.