From ad8cf19c0e97d2abd064f0a975bd42f57f4dcafb Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Thu, 21 Mar 2024 12:38:16 +0100 Subject: [PATCH] Minor optimization --- src/tools/useGuaranteedMemo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/useGuaranteedMemo.ts b/src/tools/useGuaranteedMemo.ts index 4756ee6..346483d 100644 --- a/src/tools/useGuaranteedMemo.ts +++ b/src/tools/useGuaranteedMemo.ts @@ -13,7 +13,7 @@ export function useGuaranteedMemo( 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(),