Skip to content

Commit 849eccf

Browse files
committed
fix(atomWithProxy): update promise
1 parent e94b52d commit 849eccf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/atomWithProxy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { SetStateAction } from 'jotai/vanilla';
33
import { snapshot, subscribe } from 'valtio/vanilla';
44

55
const isObject = (x: unknown): x is object =>
6-
typeof x === 'object' && x !== null;
6+
typeof x === 'object' && x !== null && !(x instanceof Promise);
77

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

0 commit comments

Comments
 (0)