Skip to content

Commit

Permalink
Minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Mar 21, 2024
1 parent 9143bd0 commit ad8cf19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/useGuaranteedMemo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function useGuaranteedMemo<T>(
if (
ref.current === undefined ||
deps.length !== ref.current.prevDeps.length ||
ref.current.prevDeps.map((v, i) => v === deps[i]).indexOf(false) >= 0
ref.current.prevDeps.find((v, i) => v !== deps[i]) !== undefined
) {
ref.current = {
"v": fn(),
Expand Down

0 comments on commit ad8cf19

Please sign in to comment.