diff options
author | bob <bcz@cs.brown.edu> | 2020-01-10 16:05:00 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2020-01-10 16:05:00 -0500 |
commit | 596d30bc3f755eaafd413ced7613ace6735458fa (patch) | |
tree | 44c8764cd135f7d8488fda5f5bfb01e5f60a96a9 /src/client/util/DropConverter.ts | |
parent | a1760ecbb780dc17a7675bd60fb50aa1103fa961 (diff) |
better working version of pivot viewer
Diffstat (limited to 'src/client/util/DropConverter.ts')
-rw-r--r-- | src/client/util/DropConverter.ts | 8 |
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; } |