Skip to content

Commit dca4832

Browse files
authored
Fix React SSR hydration mismatch for objects of other realms
1 parent c8cca33 commit dca4832

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DataTypeDetection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const isArray = (data: any): data is Array<any> => {
2323
};
2424

2525
export const isObject = (data: any): data is object => {
26-
return data instanceof Object && data !== null;
26+
return typeof data === "object" && data !== null;
2727
};
2828

2929
export const isNull = (data: any): data is null => {

0 commit comments

Comments
 (0)