[ci] format
This commit is contained in:
parent
d3a6f9f836
commit
a4780e97f6
2 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
import type { GetStaticPathsItem, Params, RouteData } from '../../@types/astro';
|
import type { GetStaticPathsItem, Params, RouteData } from '../../@types/astro';
|
||||||
import { validateGetStaticPathsParameter } from './validation.js';
|
|
||||||
import { trimSlashes } from '../path.js';
|
import { trimSlashes } from '../path.js';
|
||||||
|
import { validateGetStaticPathsParameter } from './validation.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* given an array of params like `['x', 'y', 'z']` for
|
* 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);
|
validateGetStaticPathsParameter(next, route.component);
|
||||||
const [key, value] = next;
|
const [key, value] = next;
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
acc[key] = typeof value === 'string' ? trimSlashes(value) : value.toString()
|
acc[key] = typeof value === 'string' ? trimSlashes(value) : value.toString();
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, {} as Params);
|
}, {} as Params);
|
||||||
|
|
|
@ -12,7 +12,7 @@ import testAdapter from '../../test-adapter.js';
|
||||||
|
|
||||||
const root = new URL('../../fixtures/alias/', import.meta.url);
|
const root = new URL('../../fixtures/alias/', import.meta.url);
|
||||||
const fileSystem = {
|
const fileSystem = {
|
||||||
'/src/pages/[...testSlashTrim].astro': `
|
'/src/pages/[...testSlashTrim].astro': `
|
||||||
---
|
---
|
||||||
export function getStaticPaths() {
|
export function getStaticPaths() {
|
||||||
return [
|
return [
|
||||||
|
|
Loading…
Reference in a new issue