Files
Jérémie PardouandJonathan Adeline ca72db9a16 Nuxt3 builder fixes and cleanup (#4657)
* Fix preview error with page parameter

* Fix OIDC form support

* Fix input border color

* Fix some builder inputs

* Clear some TODO MIGs

* Clean comments

* Update snapshot

* Fix page title

* Fix reactivity issue

* refactor: replace individual RadioButtons with a RadioGroup component for choice option type selection.

* Fix domain

---------

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
2026-02-11 11:07:26 +01:00

23 lines
838 B
JavaScript

import { useRouter } from '#app'
import { isNavigationFailure, NavigationFailureType } from 'vue-router'
export default defineNuxtPlugin(() => {
const router = useRouter()
const originalPush = router.push
router.push = async function (...args) {
try {
return await originalPush.call(this, ...args)
} catch (error) {
// When navigating to a page, it can happen that it redirects to another one.
// For some reason, this is causing the router throw an error. In our case, it's
// perfectly fine, so we're suppressing this error here. More information:
// https://stackoverflow.com/questions/62223195/vue-router-uncaught-in-promise-
// error-redirected-from-login-to-via-a
if (!isNavigationFailure(error, NavigationFailureType.redirected)) {
throw error
}
}
}
})