summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/src/core/routing/manifest/create.ts2
-rw-r--r--packages/astro/test/units/routing/manifest.test.js34
2 files changed, 18 insertions, 18 deletions
diff --git a/packages/astro/src/core/routing/manifest/create.ts b/packages/astro/src/core/routing/manifest/create.ts
index 874cfadc2..6ab297a5e 100644
--- a/packages/astro/src/core/routing/manifest/create.ts
+++ b/packages/astro/src/core/routing/manifest/create.ts
@@ -197,7 +197,7 @@ function routeComparator(a: ManifestRouteData, b: ManifestRouteData) {
// For sorting purposes, an index route is considered to have one more segment than the URL it represents.
const aLength = a.isIndex ? a.segments.length + 1 : a.segments.length;
const bLength = b.isIndex ? b.segments.length + 1 : b.segments.length;
-
+
// Sort more specific routes before less specific routes
if (aLength !== bLength) {
return aLength > bLength ? -1 : 1;
diff --git a/packages/astro/test/units/routing/manifest.test.js b/packages/astro/test/units/routing/manifest.test.js
index 55724d2c9..7bfdf6839 100644
--- a/packages/astro/test/units/routing/manifest.test.js
+++ b/packages/astro/test/units/routing/manifest.test.js
@@ -129,23 +129,23 @@ describe('routing - createRouteManifest', () => {
});
expect(getManifestRoutes(manifest)).to.deep.equal([
- {
- "route": "/",
- "type": "page",
- },
- {
- "route": "/static",
- "type": "page",
- },
- {
- "route": "/[dynamic]",
- "type": "page",
- },
- {
- "route": "/[...rest]",
- "type": "page",
- },
- ]);
+ {
+ route: '/',
+ type: 'page',
+ },
+ {
+ route: '/static',
+ type: 'page',
+ },
+ {
+ route: '/[dynamic]',
+ type: 'page',
+ },
+ {
+ route: '/[...rest]',
+ type: 'page',
+ },
+ ]);
});
it('injected routes are sorted in legacy mode above filesystem routes', async () => {