From 436c720d5e7a4b5d98d9bc7fb90c22815b7ac9cc Mon Sep 17 00:00:00 2001 From: ItsJonQ Date: Wed, 15 Nov 2017 17:00:19 -0500 Subject: [PATCH] isValidPost: Remove post.body validation 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. --- src/utils/isValidPost.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/isValidPost.js b/src/utils/isValidPost.js index 96cb3f7..0b2bb95 100644 --- a/src/utils/isValidPost.js +++ b/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) )