From 36a0bd9f45ded86993b0f12deb8383eb4281d87c Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Wed, 6 Mar 2024 13:54:49 +0300 Subject: [PATCH] Simplify collection middleware conditionals Signed-off-by: Olga Bulat --- frontend/src/middleware/collection.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/middleware/collection.ts b/frontend/src/middleware/collection.ts index d023b870efd..773dcdd257a 100644 --- a/frontend/src/middleware/collection.ts +++ b/frontend/src/middleware/collection.ts @@ -26,13 +26,17 @@ const queryToCollectionParams = ( collection: "tag", tag: query.tag, } as TagCollection - } else if ("creator" in query && "source" in query) { + } + + if ("creator" in query && "source" in query) { return { collection: "creator", creator: query.creator, source: query.source, } as CreatorCollection - } else if ("source" in query) { + } + + if ("source" in query) { return { collection: "source", source: query.source,