From b01c96b156a299de81b40cc24d149ae4977fa200 Mon Sep 17 00:00:00 2001 From: Aleksandar Cakalic Date: Thu, 31 Oct 2024 17:16:18 +0100 Subject: [PATCH] fix: case when `window` is `undefined` in `getInjectedArgentX` --- src/connectors/argent/helpers/getInjectedArgentX.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/connectors/argent/helpers/getInjectedArgentX.ts b/src/connectors/argent/helpers/getInjectedArgentX.ts index 92d3497..21d46fd 100644 --- a/src/connectors/argent/helpers/getInjectedArgentX.ts +++ b/src/connectors/argent/helpers/getInjectedArgentX.ts @@ -1,6 +1,9 @@ import type { StarknetWindowObject } from "@starknet-io/types-js" export function getInjectedArgentX() { + if (typeof window === "undefined") { + return undefined + } return window?.starknet_argentX as | (StarknetWindowObject & { isInAppBrowser: boolean