Return object for getPathPartsFromAstroRequest

This commit is contained in:
Sam Carlton 2022-05-25 18:28:34 -05:00
parent 5dbbca4610
commit 5d6e4954da
3 changed files with 23 additions and 8 deletions

View file

@ -25,11 +25,10 @@ if ( redirectResponse !== null ) {
// Get type and slug from the request path
// so that we don't have extra parts for
// urls like /:type/:slug/benchmarks
const [
,
const {
pathSlug,
subSlug = null
] = getPathPartsFromAstroRequest( Astro.request )
} = getPathPartsFromAstroRequest( Astro.request )
const isBenchmarkPage = subSlug === 'benchmarks'