fix: ctrl+click with spa enabled

This commit is contained in:
Jacky Zhao 2023-10-08 09:15:06 -07:00
parent 6c8e7e5bb0
commit 38db1fd55d

View File

@ -92,7 +92,7 @@ function createRouter() {
if (typeof window !== "undefined") {
window.addEventListener("click", async (event) => {
const { url } = getOpts(event) ?? {}
if (!url) return
if (!url || event.ctrlKey || event.metaKey) return
event.preventDefault()
try {
navigate(url, false)