// only IE9 seems to break the inheritance chain
// and set Error as the name
if (error.name === 'Error') {
- // @ts-ignore for IE inheritance suport
+ // @ts-ignore for IE inheritance support
return error[isRouterError]
} else {
return error instanceof RouterError
// only IE9 seems to break the inheritance chain
// and set Error as the name
if (error.name === 'Error') {
- // @ts-ignore for IE inheritance suport
+ // @ts-ignore for IE inheritance support
return error[isNoRouteMatchError]
} else {
return error instanceof NoRouteMatchError
super(
`Cannot redirect using a relative location:\n${stringifyRoute(
location
- )}\nUse the function redirect and explicitely provide a name`
+ )}\nUse the function redirect and explicitly provide a name`
)
}
// only IE9 seems to break the inheritance chain
// and set Error as the name
if (error.name === 'Error') {
- // @ts-ignore for IE inheritance suport
+ // @ts-ignore for IE inheritance support
return error[isInvalidRouteMatch]
} else {
return error instanceof InvalidRouteMatch
to: RouteLocation
from: RouteLocationNormalized
- // TODO: refactor order of argumnets
+ // TODO: refactor order of arguments
// TODO: refactor into parent class NavigationError
constructor(from: RouteLocationNormalized, to: RouteLocation) {
super(
// only IE9 seems to break the inheritance chain
// and set Error as the name
if (error.name === 'Error') {
- // @ts-ignore for IE inheritance suport
+ // @ts-ignore for IE inheritance support
return error[isNavigationGuardRedirect]
} else {
return error instanceof NavigationGuardRedirect
// only IE9 seems to break the inheritance chain
// and set Error as the name
if (error.name === 'Error') {
- // @ts-ignore for IE inheritance suport
+ // @ts-ignore for IE inheritance support
return error[isNavigationAborted]
} else {
return error instanceof NavigationAborted
// only IE9 seems to break the inheritance chain
// and set Error as the name
if (error.name === 'Error') {
- // @ts-ignore for IE inheritance suport
+ // @ts-ignore for IE inheritance support
return error[isNavigationCancelled]
} else {
return error instanceof NavigationCancelled
}
/**
- * Creates a noramlized history location from a window.location object
+ * Creates a normalized history location from a window.location object
* @param location
*/
function createCurrentLocation(
historyState.value = state
if (pauseState && pauseState.fullPath === from.fullPath) {
- cs.info('❌ Ignored beacuse paused for', pauseState.fullPath)
+ cs.info('❌ Ignored because paused for', pauseState.fullPath)
// reset pauseState
pauseState = null
return
}
function listen(callback: NavigationCallback) {
- // settup the listener and prepare teardown callbacks
+ // setup the listener and prepare teardown callbacks
listeners.push(callback)
const teardown = () => {
window.removeEventListener('beforeunload', beforeUnloadListener)
}
- // settup the listeners and prepare teardown callbacks
+ // setup the listeners and prepare teardown callbacks
window.addEventListener('popstate', popStateHandler)
window.addEventListener('beforeunload', beforeUnloadListener)