From 1af12e99d3f20999eac2c67f27c4449251a64001 Mon Sep 17 00:00:00 2001
From: Bob Zeleznik <zzzman@gmail.com>
Date: Fri, 24 Jan 2020 08:21:00 -0500
Subject: idle changes.

---
 .../views/collections/CollectionStackingViewFieldColumn.tsx      | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/client/views/collections/CollectionStackingViewFieldColumn.tsx')

diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
index 5a919c2bc..249d3de68 100644
--- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
+++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
@@ -140,16 +140,15 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC
         } else if (value.startsWith(":")) {
             const { Document, addDocument } = this.props.parent.props;
             const fieldKey = value.substring(1);
-            const proto = Doc.GetProto(Document);
-            const dataDoc = this.props.parent.props.DataDoc || this.props.parent.dataDoc;
-            const created = Docs.Get.DocumentFromField(dataDoc, fieldKey, proto);
+            const dataDoc = this.props.parent.props.DataDoc || this.props.parent.Document;
+            const created = Docs.Get.DocumentFromField(dataDoc, fieldKey, Doc.GetProto(Document));
             if (created) {
-                created.title = fieldKey;
                 if (this.props.parent.Document.isTemplateDoc) {
                     Doc.MakeMetadataFieldTemplate(created, this.props.parent.props.Document);
                 }
+                return addDocument(created);
             }
-            return created ? addDocument(created) : false;
+            return false;
         }
         this._createAliasSelected = false;
         const key = StrCast(this.props.parent.props.Document.sectionFilter);
-- 
cgit v1.2.3-70-g09d2

