Skip to content

Commit

Permalink
remove unnecessary delete dirtybit
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaskasky committed Jan 8, 2025
1 parent 0dc8a47 commit 023480c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/vanilla/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ const buildStore = (...storeArgs: StoreArgs): Store => {
atomState.v = valueOrPromise
}
delete atomState.e
delete atomState.x
if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {
++atomState.n
if (pendingPromise) {
Expand Down Expand Up @@ -432,7 +431,6 @@ const buildStore = (...storeArgs: StoreArgs): Store => {
} catch (error) {
delete atomState.v
atomState.e = error
delete atomState.x
++atomState.n
return atomState
} finally {
Expand Down

0 comments on commit 023480c

Please sign in to comment.