mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* 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>
23 lines
838 B
JavaScript
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
|
|
}
|
|
}
|
|
}
|
|
})
|