diff --git a/backend/src/controllers/v2/secretsController.ts b/backend/src/controllers/v2/secretsController.ts index 993b2359f..9a011bc5f 100644 --- a/backend/src/controllers/v2/secretsController.ts +++ b/backend/src/controllers/v2/secretsController.ts @@ -289,8 +289,7 @@ export const getSecrets = async (req: Request, res: Response) => { const { workspaceId, environment, tagSlugs } = req.query; - const tagNamesList = typeof tagSlugs === 'string' ? tagSlugs.split(',') : []; - + const tagNamesList = typeof tagSlugs === 'string' && tagSlugs !== '' ? tagSlugs.split(',') : []; let userId = "" // used for getting personal secrets for user let userEmail = "" // used for posthog if (req.user) {