File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 11import type { Collections , CollectionQueryBuilder , SQLOperator } from '@nuxt/content'
2+ import { withoutTrailingSlash } from 'ufo'
23import { tables } from '#content/manifest'
34
45export const collectionQureyBuilder = < T extends keyof Collections > ( collection : T , fetch : ( collection : T , sql : string ) => Promise < Collections [ T ] [ ] > ) : CollectionQueryBuilder < Collections [ T ] > => {
@@ -17,7 +18,7 @@ export const collectionQureyBuilder = <T extends keyof Collections>(collection:
1718
1819 const query : CollectionQueryBuilder < Collections [ T ] > = {
1920 path ( path : string ) {
20- return query . where ( 'path' , '=' , path )
21+ return query . where ( 'path' , '=' , withoutTrailingSlash ( path ) )
2122 } ,
2223 skip ( skip : number ) {
2324 params . offset = skip
You can’t perform that action at this time.
0 commit comments