aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/CollectionStackingViewFieldColumn.tsx')
-rw-r--r--src/client/views/collections/CollectionStackingViewFieldColumn.tsx9
1 files changed, 4 insertions, 5 deletions
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);