Unverified Commit baf0bfab authored by Louis DeScioli's avatar Louis DeScioli Committed by GitHub

Removes onNavigate from transition scope (#78605)

parent c5ee69c9
......@@ -271,30 +271,28 @@ function linkClicked(
e.preventDefault()
const navigate = () => {
if (onNavigate) {
let isDefaultPrevented = false
if (onNavigate) {
let isDefaultPrevented = false
onNavigate({
preventDefault: () => {
isDefaultPrevented = true
},
})
onNavigate({
preventDefault: () => {
isDefaultPrevented = true
},
})
if (isDefaultPrevented) {
return
}
if (isDefaultPrevented) {
return
}
}
React.startTransition(() => {
dispatchNavigateAction(
as || href,
replace ? 'replace' : 'push',
scroll ?? true,
linkInstanceRef.current
)
}
React.startTransition(navigate)
})
}
function formatStringOrUrl(urlObjOrString: UrlObject | string): string {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment