Skip to content

Commit

Permalink
fix: ignore empty labels filters
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Oct 18, 2024
1 parent 1e767ff commit aa7b559
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/graphql/operations/proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default async function (parent, args) {
searchSql += ' AND p.flagged = 0';
}

if (where.labels_in) {
if (where?.labels_in?.length) {
searchSql += ' AND JSON_OVERLAPS(p.labels, ?)';
params.push(JSON.stringify(where.labels_in));
}
Expand Down

0 comments on commit aa7b559

Please sign in to comment.