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