Skip to content

Commit

Permalink
fix(ui): null-safe search filters
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-mulier-p committed Feb 4, 2025
1 parent 4392c89 commit a6ce86d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/filter/KestraFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,11 @@
if (typeof wholeSearchContent.at(-1) === "string") {
if (
["labels", "details"].includes(wholeSearchContent.at(-2)?.label) ||
wholeSearchContent.at(-2).value?.length === 0
wholeSearchContent.at(-2)?.value?.length === 0
) {
// Adding value to preceding empty filter
// TODO Provide a way for user to escape infinite labels & details loop (you can never fallback to a new filter, any further text will be added as a value to the filter)
wholeSearchContent.at(-2).value?.push(wholeSearchContent.at(-1));
wholeSearchContent.at(-2)?.value?.push(wholeSearchContent.at(-1));
} else {
// Adding text search string
const label = t("filters.options.text");
Expand Down

0 comments on commit a6ce86d

Please sign in to comment.