Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix falsy values not being returned in post fields (vercel#29011)
I imported a bunch of old markdown posts to the blog-starter example but some of the post metadata was not returned by the API in the example code. For example, having `published: false` in post metadata was not returned in the item fields. The problem was in check: ``` if (data[field]) { items[field] = data[field] } ``` This rejects all falsy values in addition to fields that are not set. Checking only for `undefined` should fix this issue. I didn't find existing integration tests for the blog example nor an issue describing this problem. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
- Loading branch information