aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DropConverter.ts
diff options
context:
space:
mode:
authorStanley Yip <stanley_yip@brown.edu>2020-01-17 15:45:05 -0500
committerStanley Yip <stanley_yip@brown.edu>2020-01-17 15:45:05 -0500
commit8667498929fce14295658f89c8787a1a9b1ce468 (patch)
treec3d03768bf2b8d23e438479c67141fae43c63e1e /src/client/util/DropConverter.ts
parent4b0a056f1afaf20dea4be64c7b238748d99ad12e (diff)
parent9620d149a2051bc9b42a037b1c65b61deebd11fa (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into pen
Diffstat (limited to 'src/client/util/DropConverter.ts')
-rw-r--r--src/client/util/DropConverter.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/util/DropConverter.ts b/src/client/util/DropConverter.ts
index 9e036d6c2..da0ad7efe 100644
--- a/src/client/util/DropConverter.ts
+++ b/src/client/util/DropConverter.ts
@@ -14,13 +14,13 @@ function makeTemplate(doc: Doc): boolean {
const fieldKey = layout.replace("fieldKey={'", "").replace(/'}$/, "");
const docs = DocListCast(layoutDoc[fieldKey]);
let any = false;
- docs.map(d => {
+ docs.forEach(d => {
if (!StrCast(d.title).startsWith("-")) {
any = true;
- return Doc.MakeMetadataFieldTemplate(d, Doc.GetProto(layoutDoc));
+ Doc.MakeMetadataFieldTemplate(d, Doc.GetProto(layoutDoc));
+ } else if (d.type === DocumentType.COL) {
+ any = makeTemplate(d) || any;
}
- if (d.type === DocumentType.COL) return makeTemplate(d);
- return false;
});
return any;
}