From b0650fb8b82ceacfd33de4ab807d6fe5782ca03b Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Thu, 26 Oct 2023 10:33:24 +0700 Subject: [PATCH] UBER-1129: Fix list support attached documents properly (#3889) Signed-off-by: Andrey Sobolev --- .../components/issues/AssigneeEditor.svelte | 5 ++-- .../src/components/list/List.svelte | 11 ++++++--- .../src/components/list/ListCategory.svelte | 5 +--- .../src/components/list/ListHeader.svelte | 24 ++++++++++++------- 4 files changed, 27 insertions(+), 18 deletions(-) diff --git a/plugins/tracker-resources/src/components/issues/AssigneeEditor.svelte b/plugins/tracker-resources/src/components/issues/AssigneeEditor.svelte index c6330e1b38..d6849e3091 100644 --- a/plugins/tracker-resources/src/components/issues/AssigneeEditor.svelte +++ b/plugins/tracker-resources/src/components/issues/AssigneeEditor.svelte @@ -40,7 +40,8 @@ export let shrink: number = 0 export let isAction: boolean = false - $: _object = object ?? value ?? [] + $: _object = + (typeof object !== 'string' ? object : undefined) ?? (typeof value !== 'string' ? value : undefined) ?? [] const client = getClient() const dispatch = createEventDispatcher() @@ -48,7 +49,7 @@ const docQuery: DocumentQuery = { active: true } const handleAssigneeChanged = async (newAssignee: Ref | undefined | null) => { - if (newAssignee === undefined || (!Array.isArray(_object) && _object.assignee === newAssignee)) { + if (newAssignee === undefined || (!Array.isArray(_object) && _object?.assignee === newAssignee)) { return } diff --git a/plugins/view-resources/src/components/list/List.svelte b/plugins/view-resources/src/components/list/List.svelte index f23a540401..9d47ece447 100644 --- a/plugins/view-resources/src/components/list/List.svelte +++ b/plugins/view-resources/src/components/list/List.svelte @@ -13,7 +13,7 @@ // limitations under the License. -->