aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking/LinkMenuItem.tsx
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-08-08 15:28:55 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-08-08 15:28:55 -0700
commit6263a4539576ce92f97a02b9e7bde2804e01a6df (patch)
tree8268a7ee74e80d5b28bdafb8cd00d9047c520122 /src/client/views/linking/LinkMenuItem.tsx
parent9886ed681ff18a33f7acab8f83b475ca9ea60bf7 (diff)
clean up code, fix delete link bugs
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-rw-r--r--src/client/views/linking/LinkMenuItem.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx
index 17c2f42bf..de9e25f48 100644
--- a/src/client/views/linking/LinkMenuItem.tsx
+++ b/src/client/views/linking/LinkMenuItem.tsx
@@ -173,8 +173,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
@undoBatch
@action
deleteLink = (): void => {
- this.props.linkDoc.linksToAnnotation && Hypothesis.deleteLink(StrCast(this.props.linkDoc.annotationId), Utils.prepend("/doc/" + this.props.sourceDoc[Id])); // delete hyperlink in annotation
- this.props.linkDoc.linksToAnnotation && console.log("annotationId", this.props.linkDoc.annotationId);
+ this.props.linkDoc.linksToAnnotation && Hypothesis.deleteLink(this.props.linkDoc, this.props.sourceDoc, this.props.destinationDoc);
LinkManager.Instance.deleteLink(this.props.linkDoc);
runInAction(() => {