From 93bc81e5b8b886e577efe504dabe58c9e2dd4059 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Thu, 19 Mar 2026 18:16:46 +0200 Subject: [PATCH] UI: Use explicit null check in onOptionSelected to handle falsy values Truthiness check on event.option.value would incorrectly route to clear() for valid falsy values like 0 or "". Use != null instead. --- ui-ngx/src/app/shared/components/string-items-list.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/shared/components/string-items-list.component.ts b/ui-ngx/src/app/shared/components/string-items-list.component.ts index fe9c2746c3..6d0c57ab0a 100644 --- a/ui-ngx/src/app/shared/components/string-items-list.component.ts +++ b/ui-ngx/src/app/shared/components/string-items-list.component.ts @@ -208,7 +208,7 @@ export class StringItemsListComponent implements ControlValueAccessor, OnInit { } onOptionSelected(event: MatAutocompleteSelectedEvent): void { - if (event.option.value) { + if (event.option.value != null) { this.add(event.option.value); } else { this.clear();