From 88074b6b085b0b5542759cb41519de719ee61cee Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 10 Aug 2021 21:34:59 -0400 Subject: fixed error when adding to a collection that does not have a list as its data --- src/client/views/DocComponent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx index 99c695a4a..14d32ef12 100644 --- a/src/client/views/DocComponent.tsx +++ b/src/client/views/DocComponent.tsx @@ -219,7 +219,7 @@ export function ViewBoxAnnotatableComponent

; - if (annoDocs) annoDocs.push(...added); + if (annoDocs instanceof List) annoDocs.push(...added); else targetDataDoc[annotationKey ?? this.annotationKey] = new List(added); targetDataDoc[(annotationKey ?? this.annotationKey) + "-lastModified"] = new DateField(new Date(Date.now())); } -- cgit v1.2.3-70-g09d2