0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] format

This commit is contained in:
Luiz Ferraz 2024-02-14 10:07:40 +00:00 committed by astrobot-houston
parent 227cd83a51
commit 5759fd9947
2 changed files with 6 additions and 6 deletions

View file

@ -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 = '/';

View file

@ -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'],
]);