Skip to content

Commit

Permalink
fix:try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
thorkellmani committed May 28, 2024
1 parent 09e4ff8 commit 4ad72d1
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,13 @@ export const PkPass = ({

useEffect(() => {
if (pkpassUrl && !hasPassedTimeout(linkTimestamp, 10)) {
window.location.assign(pkpassUrl)
try {
window.location.assign(pkpassUrl)
} catch {
handleError(formatMessage(m.licenseFetchError))
}
}
}, [pkpassUrl, linkTimestamp])
}, [pkpassUrl, linkTimestamp, formatMessage])

const getLink = async () => {
await generatePkPass({
Expand Down

0 comments on commit 4ad72d1

Please sign in to comment.