Skip to content

Commit

Permalink
Skip empty template fields in compact mode
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Jul 19, 2019
1 parent 6a794f7 commit acf3f05
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/selectors/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ const getMetadataFields = memo(

if (template != null) {
for (let f of template.fields) {
if (compact && (data == null || !(f.property in data))) {
continue
}

idx[f.property] = fld.length

fld.push({
isExtra: false,
isRequired: f.isRequired,
Expand Down

0 comments on commit acf3f05

Please sign in to comment.