diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-08-04 10:16:46 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-08-04 10:16:46 -0400 |
commit | fd047fa87334b948a4a0b00ccf9bd02ded03ea36 (patch) | |
tree | 86cd21556387a1eb317667e09ab6c35778a2f790 | |
parent | 02346eabdefd428ca23d6a3fbefdcd51ef62b738 (diff) |
fixed MakeLink (& text linking)
-rw-r--r-- | src/client/documents/Documents.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 07e38a4c0..e804d5440 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -602,9 +602,8 @@ export namespace DocUtils { if (sv && sv.props.ContainingCollectionView && sv.props.ContainingCollectionView.props.Document === target) return; if (target === CurrentUserUtils.UserDocument) return undefined; - let linkDoc: Doc | undefined; + let linkDocProto = new Doc(); UndoManager.RunInBatch(() => { - let linkDocProto = new Doc(); linkDocProto.type = DocumentType.LINK; linkDocProto.targetContext = targetContext; @@ -628,7 +627,7 @@ export namespace DocUtils { computed.compiled && (Doc.GetProto(source).links = new ComputedField(computed)); computed.compiled && (Doc.GetProto(target).links = new ComputedField(computed)); }, "make link"); - return linkDoc; + return linkDocProto; } } |