aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocComponent.tsx
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2023-02-09 00:03:40 -0500
committermehekj <mehek.jethani@gmail.com>2023-02-09 00:03:40 -0500
commit739fee917e4aa15ff7aef659cc84bfbd3cb48bcf (patch)
tree96babde1ca9ae32379fabcb29f38360701b42c87 /src/client/views/DocComponent.tsx
parentca3868b494bfd00c0349424f622bb5010b0e1197 (diff)
parenta8b19694ec902d4094914ba6ddd15e700fab117e (diff)
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/DocComponent.tsx')
-rw-r--r--src/client/views/DocComponent.tsx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx
index 78ab2b3d4..7c81d92d4 100644
--- a/src/client/views/DocComponent.tsx
+++ b/src/client/views/DocComponent.tsx
@@ -151,13 +151,10 @@ export function ViewBoxAnnotatableComponent<P extends ViewBoxAnnotatableProps>()
const indocs = doc instanceof Doc ? [doc] : doc;
const docs = indocs.filter(doc => [AclEdit, AclAdmin].includes(effectiveAcl) || GetEffectiveAcl(doc) === AclAdmin);
if (docs.length) {
- setTimeout(() =>
- docs.map(doc => {
- // this allows 'addDocument' to see the annotationOn field in order to create a pushin
- Doc.SetInPlace(doc, 'followLinkToggle', undefined, true);
- doc.annotationOn === this.props.Document && Doc.SetInPlace(doc, 'annotationOn', undefined, true);
- })
- );
+ docs.map(doc => {
+ Doc.SetInPlace(doc, 'followLinkToggle', undefined, true);
+ doc.annotationOn === this.props.Document && Doc.SetInPlace(doc, 'annotationOn', undefined, true);
+ });
const targetDataDoc = this.dataDoc;
const value = DocListCast(targetDataDoc[annotationKey ?? this.annotationKey]);
const toRemove = value.filter(v => docs.includes(v));