Skip to content

Commit

Permalink
fix(atomWithProxy): update promise
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed Jul 4, 2024
1 parent e94b52d commit 849eccf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/atomWithProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { SetStateAction } from 'jotai/vanilla';
import { snapshot, subscribe } from 'valtio/vanilla';

const isObject = (x: unknown): x is object =>
typeof x === 'object' && x !== null;
typeof x === 'object' && x !== null && !(x instanceof Promise);

const applyChanges = <T extends object>(proxyObject: T, prev: T, next: T) => {
(Object.getOwnPropertyNames(prev) as (keyof T)[]).forEach((key) => {
Expand Down

0 comments on commit 849eccf

Please sign in to comment.