From 54e5f5efb3b0453430b5a943ba02ac4de1ca4913 Mon Sep 17 00:00:00 2001 From: selectthegang Date: Wed, 6 Jul 2022 21:01:48 -0500 Subject: [PATCH] Update src/routes/api/entries.json.ts Co-authored-by: mat <27899617+mat-1@users.noreply.github.com> --- src/routes/api/entries.json.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/api/entries.json.ts b/src/routes/api/entries.json.ts index 23fea4cd..7f9d96e6 100644 --- a/src/routes/api/entries.json.ts +++ b/src/routes/api/entries.json.ts @@ -10,7 +10,7 @@ export const get: RequestHandler = async req => { const showVisible = req.url.searchParams.get('visible') !== 'false' const showUnlisted = req.url.searchParams.get('unlisted') === 'true' const showHidden = req.url.searchParams.get('hidden') === 'true' - const tags = req.url.searchParams.get('tags')?.split(',') + const tags = req.url.searchParams.get('tags')?.split(',')?.map(tag => tag.trim())?.filter(tag => tag.length > 0) const query = req.url.searchParams.get('query') const user = req.locals.user ? await fetchUser({ id: req.locals.user.id }) : null