Skip to content

Commit

Permalink
fix: case when window is undefined in getInjectedArgentX
Browse files Browse the repository at this point in the history
  • Loading branch information
Cussone committed Oct 31, 2024
1 parent a2d5423 commit b01c96b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/connectors/argent/helpers/getInjectedArgentX.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b01c96b

Please sign in to comment.