aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Doc.ts
diff options
context:
space:
mode:
authorNaafiyan Ahmed <naafiyan@gmail.com>2022-06-09 12:46:25 -0400
committerNaafiyan Ahmed <naafiyan@gmail.com>2022-06-09 12:46:25 -0400
commit7d38e4a98a0382cdd032d63d375707f19362873d (patch)
tree415273805b218e07a4ad9e4c547e26469c4b0e13 /src/fields/Doc.ts
parent9de05a8fc6d1cda01662f9bce3a5f6764d280be3 (diff)
parent331cb0bec8089c4435126542ed3181fe227eff51 (diff)
cleaned up code in InkTranscription
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r--src/fields/Doc.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts
index b0a45091e..6abc27b23 100644
--- a/src/fields/Doc.ts
+++ b/src/fields/Doc.ts
@@ -1073,9 +1073,9 @@ export namespace Doc {
}
let _lastDate = 0;
- export function linkFollowHighlight(destDoc: Doc, dataAndDisplayDocs = true) {
+ export function linkFollowHighlight(destDoc: Doc | Doc[], dataAndDisplayDocs = true) {
linkFollowUnhighlight();
- Doc.HighlightDoc(destDoc, dataAndDisplayDocs);
+ (destDoc instanceof Doc ? [destDoc] : destDoc).forEach(doc => Doc.HighlightDoc(doc, dataAndDisplayDocs));
document.removeEventListener("pointerdown", linkFollowUnhighlight);
document.addEventListener("pointerdown", linkFollowUnhighlight);
const lastDate = _lastDate = Date.now();