Skip to content

Commit

Permalink
fix: change prevent default
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJiang2021 authored and CarlLiu2023 committed Jun 6, 2023
1 parent dcf3b78 commit c981d09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/hooks/useB3AppOpen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const useB3AppOpen = (initOpenState: OpenPageState) => {
) {
initOpenState.handleEnterClick()
} else {
const href = (e.target as HTMLAnchorElement).href || ''
const href = (e.target as HTMLAnchorElement)?.href || ''
const gotoUrl = registerArr.includes(e.target)
? getCurrentLoginUrl(href)
: '/orders'
Expand All @@ -83,7 +83,7 @@ export const useB3AppOpen = (initOpenState: OpenPageState) => {
window.b2bStorefrontApp.isInit = true

window.addEventListener('click', handleTriggerClick, {
capture: true,
capture: false,
})
return () => {
window.removeEventListener('click', handleTriggerClick)
Expand Down

0 comments on commit c981d09

Please sign in to comment.