Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed May 15, 2023
1 parent 7cfa9d7 commit d90dd19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vanilla/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const hasPromiseAtomValue = <Value>(
): a is AtomState<Value> & { v: Value & Promise<unknown> } =>
'v' in a && a.v instanceof Promise

const isEqualAtomPromiseValue = <Value>(
const isEqualPromiseAtomValue = <Value>(
a: AtomState<Promise<Value> & PromiseMeta<Value>>,
b: AtomState<Promise<Value> & PromiseMeta<Value>>
) => 'v' in a && 'v' in b && a.v.orig && a.v.orig === b.v.orig
Expand Down Expand Up @@ -224,7 +224,7 @@ export const createStore = () => {
prevAtomState &&
hasPromiseAtomValue(prevAtomState) &&
hasPromiseAtomValue(nextAtomState) &&
isEqualAtomPromiseValue(prevAtomState, nextAtomState)
isEqualPromiseAtomValue(prevAtomState, nextAtomState)
) {
if (prevAtomState.d === nextAtomState.d) {
// bail out
Expand Down

0 comments on commit d90dd19

Please sign in to comment.