aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocComponent.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-05-14 23:16:04 -0400
committerbobzel <zzzman@gmail.com>2024-05-14 23:16:04 -0400
commit6a332d5c1e248d976c44eecc67161b4d1b401a0e (patch)
tree7ab811cd5350578c8b7daf731236765b10daf154 /src/client/views/DocComponent.tsx
parent3534aaf88a3c30a474b3b5a5b7f04adfe6f15fac (diff)
post merge fixes for sarah-ai-visualizatoin
Diffstat (limited to 'src/client/views/DocComponent.tsx')
-rw-r--r--src/client/views/DocComponent.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx
index 94e84e647..e5752dcd2 100644
--- a/src/client/views/DocComponent.tsx
+++ b/src/client/views/DocComponent.tsx
@@ -233,7 +233,7 @@ export function ViewBoxAnnotatableComponent<P extends FieldViewProps>() {
const annoDocs = Doc.Get(targetDataDoc, annotationKey ?? this.annotationKey, true) as List<Doc>; // get the dataDoc directly ... when using templates there may be some default items already there, but we can't change them, so we copy them below (should really be some kind of inheritance since the template contents could change)
if (annoDocs instanceof List) annoDocs.push(...added.filter(add => !annoDocs.includes(add)));
- else targetDataDoc[annotationKey ?? this.annotationKey] = new List<Doc>([...added, ...(annoDocs === undefined ? DocListCast(targetDataDoc[annotationKey ?? this.annotationKey]) : [])]);
+ else targetDataDoc[annotationKey || this.annotationKey] = new List<Doc>([...added, ...(annoDocs === undefined ? DocListCast(targetDataDoc[annotationKey ?? this.annotationKey]) : [])]);
targetDataDoc[(annotationKey ?? this.annotationKey) + '_modificationDate'] = new DateField();
}
}