From a868c65e2cebe642d40715e51079818390bb9b75 Mon Sep 17 00:00:00 2001 From: daishi <daishi@axlight.com> Date: Sun, 22 Oct 2023 22:28:11 +0900 Subject: [PATCH] fix to pass the test --- src/vanilla/store.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vanilla/store.ts b/src/vanilla/store.ts index e936cc9b44..bde30f57d4 100644 --- a/src/vanilla/store.ts +++ b/src/vanilla/store.ts @@ -373,7 +373,11 @@ export const createStore = () => { return true } const aState = readAtomState(a) - return aState === s || (aState && !hasPromiseAtomValue(aState)) + return ( + aState === s || + // We need to check values in case only dependencies are changed + (aState && isEqualAtomValue(aState, s)) + ) }) ) { return atomState