Skip to content

Commit

Permalink
chore: remove warning for deleting atom with read promise (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored May 12, 2021
1 parent ccbc07c commit e5ccf88
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/core/vanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,6 @@ const unmountAtom = <Value>(state: State, atom: Atom<Value>): void => {
// unmount dependencies afterward
const atomState = getAtomState(state, atom)
if (atomState) {
if (
atomState.p && // read promise
typeof process === 'object' &&
process.env.NODE_ENV !== 'production'
) {
console.warn('[Bug] deleting atomState with read promise', atom)
}
atomState.d.forEach((_, a) => {
if (a !== atom) {
const mounted = state.m.get(a)
Expand Down

1 comment on commit e5ccf88

@vercel
Copy link

@vercel vercel bot commented on e5ccf88 May 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.