aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-07-28 17:59:22 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-07-28 17:59:22 -0400
commitaaf1776644f6701462022cccc7088c24b5c72000 (patch)
tree6b96636c5346a431adccd58142f0a384426b396f /src/client/documents
parentbe1e6e967a60f49eec1cb1d404912b0736812323 (diff)
parentcb2347347c8d9d2a0f1531479c73ecbcb3008128 (diff)
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/documents')
-rw-r--r--src/client/documents/Documents.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index e6fe1b8b3..ee1b9fd0d 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -582,12 +582,12 @@ export namespace Docs {
export namespace DocUtils {
export function MakeLink(source: Doc, target: Doc, targetContext?: Doc, title: string = "", description: string = "", tags: string = "Default", sourceContext?: Doc) {
- if (LinkManager.Instance.doesLinkExist(source, target)) return;
+ if (LinkManager.Instance.doesLinkExist(source, target)) return undefined;
let sv = DocumentManager.Instance.getDocumentView(source);
if (sv && sv.props.ContainingCollectionView && sv.props.ContainingCollectionView.props.Document === target) return;
- if (target === CurrentUserUtils.UserDocument) return;
+ if (target === CurrentUserUtils.UserDocument) return undefined;
- let linkDoc;
+ let linkDoc: Doc | undefined;
UndoManager.RunInBatch(() => {
linkDoc = Docs.Create.TextDocument({ width: 100, height: 30, borderRounding: "100%" });
linkDoc.type = DocumentType.LINK;