From dca4832b99013d4278eadc4ff4f4e2b2dbb35923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Mon, 6 Jan 2025 15:00:36 +0100 Subject: [PATCH] Fix React SSR hydration mismatch for objects of other realms --- src/DataTypeDetection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataTypeDetection.ts b/src/DataTypeDetection.ts index 55d2463..3445741 100644 --- a/src/DataTypeDetection.ts +++ b/src/DataTypeDetection.ts @@ -23,7 +23,7 @@ export const isArray = (data: any): data is Array => { }; export const isObject = (data: any): data is object => { - return data instanceof Object && data !== null; + return typeof data === "object" && data !== null; }; export const isNull = (data: any): data is null => {