From fbaf3358ff01599061f3a0ab3f769cf87bdb0767 Mon Sep 17 00:00:00 2001 From: Felix Kiprotich Date: Thu, 12 Dec 2024 15:34:12 +0300 Subject: [PATCH] function cleaning --- .../users-selector/users-selector.component.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stock-operations/users-selector/users-selector.component.tsx b/src/stock-operations/users-selector/users-selector.component.tsx index 4f08adc0..8379da38 100644 --- a/src/stock-operations/users-selector/users-selector.component.tsx +++ b/src/stock-operations/users-selector/users-selector.component.tsx @@ -51,7 +51,8 @@ const UsersSelector = (props: UsersSelectorProps) => { onChange(data.selectedItem?.uuid); }} initialSelectedItem={ - userList?.find((p) => p.uuid === (autoPopulateResponsiblePerson ? user.uuid : props.userUuid)) ?? user + userList?.find((p) => p.uuid === (props?.userUuid ?? autoPopulateResponsiblePerson ? user.uuid : '')) ?? + '' } itemToString={userName} onInputChange={debouncedSearch}