Tests left over field value for null
This commit is contained in:
parent
7f6f86aeb8
commit
31a610e22e
@ -15,6 +15,7 @@ collections: # A list of collections the CMS should be able to edit
|
||||
- {label: "Publish Date", name: "date", widget: "datetime", format: "YYYY-MM-DD hh:mma"}
|
||||
- {label: "Cover Image", name: "image", widget: "image", required: false, tagname: ""}
|
||||
- {label: "Body", name: "body", widget: "markdown"}
|
||||
- {label: "Some Field", name: "somefield", widget: "string", required: false} # Testing empty field
|
||||
meta:
|
||||
- {label: "SEO Description", name: "description", widget: "text"}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
content: "---\ntitle: This is a YAML front matter post\nimage: /nf-logo.png\ndate: 2015-02-14T00:00:00.000Z\n---\n\n# I Am a Title in Markdown\n\nHello, world\n\n* One Thing\n* Another Thing\n* A Third Thing\n"
|
||||
},
|
||||
"2015-02-14-this-is-test-post.md": {
|
||||
content: "---\ntitle: This is a test post\nimage: /Photo 1-lobby_FS.jpg\ndate: 2015-02-14T00:00:00.000Z\n---\n\n# I Am a Title in Markdown\n\nHello, world\n\n* One Thing\n* Another Thing\n* A Third Thing\n"
|
||||
content: "---\ntitle: This is a test post\nimage: /Photo 1-lobby_FS.jpg\ndate: 2015-02-14T00:00:00.000Z\nsomefield: null\n---\n\n# I Am a Title in Markdown\n\nHello, world\n\n* One Thing\n* Another Thing\n* A Third Thing\n"
|
||||
},
|
||||
"2015-02-15-this-is-a-json-frontmatter-post.md": {
|
||||
content: "{\n\"title\": \"This is a JSON front matter post\",\n\"image\": \"/nf-logo.png\",\n\"date\": \"2015-02-15T00:00:00.000Z\"\n}\n\n# I Am a Title in Markdown\n\nHello, world\n\n* One Thing\n* Another Thing\n* A Third Thing\n"
|
||||
|
@ -57,7 +57,7 @@ export default class EntryListing extends React.Component {
|
||||
: inferedFields.remainingFields && inferedFields.remainingFields.map(f => (
|
||||
<p key={f.get('name')} className={styles.cardList}>
|
||||
<span className={styles.cardListLabel}>{f.get('label')}:</span>{' '}
|
||||
{ entry.getIn(['data', f.get('name')], '').toString() }
|
||||
{ entry.getIn(['data', f.get('name')], '')?entry.getIn(['data', f.get('name')], '').toString():'' }
|
||||
</p>
|
||||
))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user