From 720a9861281fab92f7794c8b58a955a11922e36d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 21 Sep 2025 00:12:48 +0000 Subject: [PATCH] Fix: Improve hydration error check in console.error Co-authored-by: vaughn.dimarco --- apps/sim/app/layout.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/sim/app/layout.tsx b/apps/sim/app/layout.tsx index b1933bce4b1..f7f8ec6b421 100644 --- a/apps/sim/app/layout.tsx +++ b/apps/sim/app/layout.tsx @@ -29,7 +29,8 @@ const BROWSER_EXTENSION_ATTRIBUTES = [ if (typeof window !== 'undefined') { const originalError = console.error console.error = (...args) => { - if (args[0].includes('Hydration')) { + const firstArg = args[0] + if (typeof firstArg === 'string' && firstArg.includes('Hydration')) { const isExtensionError = BROWSER_EXTENSION_ATTRIBUTES.some((attr) => args.some((arg) => typeof arg === 'string' && arg.includes(attr)) )