aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking/LinkMenuGroup.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-09-04 15:00:49 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-09-04 15:00:49 +0530
commit1afe593b00b8002c24086d003d0e364260b80abd (patch)
tree672c96d6ccf7d68ac668a379b1c5a6ee6d393dbe /src/client/views/linking/LinkMenuGroup.tsx
parentde49c6f52bf97f9b10008e8ca26e767b71b49abd (diff)
parent7f6f5acc59e772cb828b8e532e16d4c40465de65 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/client/views/linking/LinkMenuGroup.tsx')
-rw-r--r--src/client/views/linking/LinkMenuGroup.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/linking/LinkMenuGroup.tsx b/src/client/views/linking/LinkMenuGroup.tsx
index 2ae87ac13..8e09052a3 100644
--- a/src/client/views/linking/LinkMenuGroup.tsx
+++ b/src/client/views/linking/LinkMenuGroup.tsx
@@ -66,7 +66,8 @@ export class LinkMenuGroup extends React.Component<LinkMenuGroupProps> {
}
render() {
- const groupItems = this.props.group.map(linkDoc => {
+ const set = new Set<Doc>(this.props.group);
+ const groupItems = Array.from(set.keys()).map(linkDoc => {
const destination = LinkManager.Instance.getOppositeAnchor(linkDoc, this.props.sourceDoc) ||
LinkManager.Instance.getOppositeAnchor(linkDoc, Cast(linkDoc.anchor2, Doc, null).annotationOn === this.props.sourceDoc ? Cast(linkDoc.anchor2, Doc, null) : Cast(linkDoc.anchor1, Doc, null));
if (destination && this.props.sourceDoc) {