Fixed typos

pull/3312/head
Babak Farkhoopak 6 months ago
parent 19524cd5d4
commit 6194ff3019

@ -171,17 +171,17 @@ export function createRouter(
if (!value.fallback) continue
if (value.fallback === 'root') {
throw new Error(
`Invalid Vitepress Config: A locale (${key}), cannot fallback to (root).`
`Invalid VitePress Config: A locale (${key}), cannot fall back to (root).`
)
}
if (key === value.fallback) {
throw new Error(
`Invalid Vitepress Config: A locale (${key}), cannot have a fallback to itself.`
`Invalid VitePress Config: A locale (${key}), cannot have a fallback to itself.`
)
}
if (!Object.keys(locales).includes(value.fallback)) {
throw new Error(
`Invalid Vitepress Config: A locale (${key}), cannot have a fallback to a non existing locale.`
`Invalid VitePress Config: A locale (${key}), cannot have a fallback to a non existing locale.`
)
}
}

Loading…
Cancel
Save