Skip to content

Commit

Permalink
refactor: move check outside onMount in svelte modal
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecco committed Nov 5, 2024
1 parent f1f6856 commit 99b2e8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modal/Modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
}
let isInAppBrowser = starknetMobile?.isInAppBrowser
const userAgent = navigator.userAgent.toLowerCase()
const isBraavosMobileApp = userAgent.includes("braavos")
const setLoadingItem = (item: string | false) => {
loadingItem = item
}
Expand Down Expand Up @@ -53,9 +56,6 @@
return
}
const userAgent = navigator.userAgent.toLowerCase()
const isBraavosMobileApp = userAgent.includes("braavos")
if (isBraavosMobileApp && window?.starknet_braavos) {
try {
callback(new InjectedConnector({ options: { id: "braavos" } }))
Expand Down

0 comments on commit 99b2e8f

Please sign in to comment.