mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
227cd83a51
commit
5759fd9947
2 changed files with 6 additions and 6 deletions
|
@ -761,10 +761,10 @@ export function createRouteManifest(
|
|||
if (defaultLocaleRoutes) {
|
||||
// The index for the default locale will be either already at the root path
|
||||
// or at the root of the locale.
|
||||
const indexDefaultRoute = defaultLocaleRoutes
|
||||
.find(({route}) => route === '/')
|
||||
?? defaultLocaleRoutes.find(({route}) => route === `/${i18n.defaultLocale}`);
|
||||
|
||||
const indexDefaultRoute =
|
||||
defaultLocaleRoutes.find(({ route }) => route === '/') ??
|
||||
defaultLocaleRoutes.find(({ route }) => route === `/${i18n.defaultLocale}`);
|
||||
|
||||
if (indexDefaultRoute) {
|
||||
// we found the index of the default locale, now we create a root index that will redirect to the index of the default locale
|
||||
const pathname = '/';
|
||||
|
|
|
@ -148,7 +148,7 @@ describe('routing - createRouteManifest', () => {
|
|||
['/[dynamic]', '/[...rest]'],
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
it('route sorting with multi-layer index page conflict', async () => {
|
||||
// Reproducing regression from https://github.com/withastro/astro/issues/10071
|
||||
const fs = createFs(
|
||||
|
@ -190,7 +190,7 @@ describe('routing - createRouteManifest', () => {
|
|||
['/a/3', '/'],
|
||||
['/test', '/'],
|
||||
['/modules', '/'],
|
||||
|
||||
|
||||
// Alphabetical order
|
||||
['/modules', '/test'],
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue