aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorStanley Yip <33562077+yipstanley@users.noreply.github.com>2019-07-28 18:20:07 +0000
committerGitHub <noreply@github.com>2019-07-28 18:20:07 +0000
commit6e9b633b822c9c56f48b5b0766d730a27b32f018 (patch)
tree76b10100785b842244793df3ad174fd09a2f2381 /src/client/documents/Documents.ts
parent5fd48d3d10e86cea834f0238ec5d648febb62c81 (diff)
parent8add42e2bb0eb997a8b6eb0904381d11e9ed2905 (diff)
Merge pull request #220 from browngraphicslab/pdf_paste_backlink
Pdf paste backlink
Diffstat (limited to 'src/client/documents/Documents.ts')
-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;