UBER-1129: Fix list support attached documents properly (#3889)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-10-26 10:33:24 +07:00
committed by GitHub
parent a92423d842
commit b0650fb8b8
4 changed files with 27 additions and 18 deletions
@@ -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<Employee> = { active: true }
const handleAssigneeChanged = async (newAssignee: Ref<Person> | undefined | null) => {
if (newAssignee === undefined || (!Array.isArray(_object) && _object.assignee === newAssignee)) {
if (newAssignee === undefined || (!Array.isArray(_object) && _object?.assignee === newAssignee)) {
return
}