We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e94b52d commit 849eccfCopy full SHA for 849eccf
src/atomWithProxy.ts
@@ -3,7 +3,7 @@ import type { SetStateAction } from 'jotai/vanilla';
3
import { snapshot, subscribe } from 'valtio/vanilla';
4
5
const isObject = (x: unknown): x is object =>
6
- typeof x === 'object' && x !== null;
+ typeof x === 'object' && x !== null && !(x instanceof Promise);
7
8
const applyChanges = <T extends object>(proxyObject: T, prev: T, next: T) => {
9
(Object.getOwnPropertyNames(prev) as (keyof T)[]).forEach((key) => {
0 commit comments