From a4780e97f61ac55d3c111efb7b484a74383592a9 Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Thu, 31 Aug 2023 18:08:08 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/core/routing/params.ts | 4 ++-- packages/astro/test/units/routing/route-sanitization.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/core/routing/params.ts b/packages/astro/src/core/routing/params.ts index d2856563e0..1e6b168585 100644 --- a/packages/astro/src/core/routing/params.ts +++ b/packages/astro/src/core/routing/params.ts @@ -1,6 +1,6 @@ import type { GetStaticPathsItem, Params, RouteData } from '../../@types/astro'; -import { validateGetStaticPathsParameter } from './validation.js'; import { trimSlashes } from '../path.js'; +import { validateGetStaticPathsParameter } from './validation.js'; /** * given an array of params like `['x', 'y', 'z']` for @@ -34,7 +34,7 @@ export function stringifyParams(params: GetStaticPathsItem['params'], route: Rou validateGetStaticPathsParameter(next, route.component); const [key, value] = next; if (value !== undefined) { - acc[key] = typeof value === 'string' ? trimSlashes(value) : value.toString() + acc[key] = typeof value === 'string' ? trimSlashes(value) : value.toString(); } return acc; }, {} as Params); diff --git a/packages/astro/test/units/routing/route-sanitization.test.js b/packages/astro/test/units/routing/route-sanitization.test.js index 3bddeb92ae..14c9c38296 100644 --- a/packages/astro/test/units/routing/route-sanitization.test.js +++ b/packages/astro/test/units/routing/route-sanitization.test.js @@ -12,7 +12,7 @@ import testAdapter from '../../test-adapter.js'; const root = new URL('../../fixtures/alias/', import.meta.url); const fileSystem = { -'/src/pages/[...testSlashTrim].astro': ` + '/src/pages/[...testSlashTrim].astro': ` --- export function getStaticPaths() { return [