From ab258f226e8bd4af7fbba942729b325723e3a335 Mon Sep 17 00:00:00 2001 From: dewanshparashar Date: Tue, 17 Dec 2024 23:00:39 +0530 Subject: [PATCH] dev: type ensure --- packages/arb-token-bridge-ui/src/util/CommonUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/arb-token-bridge-ui/src/util/CommonUtils.ts b/packages/arb-token-bridge-ui/src/util/CommonUtils.ts index 987a628792..5ebfb7eca5 100644 --- a/packages/arb-token-bridge-ui/src/util/CommonUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/CommonUtils.ts @@ -17,4 +17,5 @@ export function shortenTxHash(txHash: string) { } export const isTestingEnvironment = - !!window.Cypress || process.env.NODE_ENV !== 'production' + !!(typeof window !== 'undefined' && window && window.Cypress) || + process.env.NODE_ENV !== 'production'