UBERF-5561 (#4680)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-02-16 22:10:24 +06:00 committed by GitHub
parent 5fbcf9353b
commit 0c396723ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,7 @@
import AttachmentList from './AttachmentList.svelte'
export let value: Doc & { attachments?: number }
export let attachments: Attachment[] | undefined = []
export let attachments: Attachment[] | undefined = undefined
const query = createQuery()
const savedAttachmentsQuery = createQuery()
@ -32,7 +32,7 @@
$: updateQuery(value, attachments)
function updateQuery (value: Doc & { attachments?: number }, attachments?: Attachment[]): void {
if (attachments !== undefined) {
if (attachments !== undefined && attachments.length > 0) {
resAttachments = attachments
return
}