Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
isValidPost: Remove post.body validation
Browse files Browse the repository at this point in the history
This update adjusts the `isValidPost` to allow for empty `post.body` content.
This allows for better flexibility on the consumer's end to handle posts
without content.
  • Loading branch information
ItsJonQ committed Nov 15, 2017
1 parent 98d766d commit 436c720
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/isValidPost.js
@@ -1,13 +1,12 @@
import { isObject, isNumber, isString } from 'lodash'

const isValidPost = (post = {}) => {
const { html_title, meta_description, post_body, publish_date, slug } = post
const { html_title, meta_description, publish_date, slug } = post

return (
isObject(post) &&
isString(html_title) &&
isString(meta_description) &&
isString(post_body) &&
isNumber(publish_date) &&
isString(slug)
)
Expand Down

0 comments on commit 436c720

Please sign in to comment.