diff --git a/client/state/posts/selectors.js b/client/state/posts/selectors.js index 90f9ce8c4dbd08..e52793add1616a 100644 --- a/client/state/posts/selectors.js +++ b/client/state/posts/selectors.js @@ -377,6 +377,11 @@ export function editedPostHasContent( state, siteId, postId ) { !! editedPost && ( some( [ 'title', 'excerpt' ], ( field ) => editedPost[ field ] && !! editedPost[ field ].trim() ) || + /* + * We don't yet have the notion of post's raw content in the Redux state so we rely on post content attribute here + * when we do, we'll want it to reflect the Flux implementation's emptiness check + * where raw content is preferred to the content property if available + */ ! isEmptyContent( editedPost.content ) ) ); diff --git a/client/state/sites/selectors.js b/client/state/sites/selectors.js index 72d2e2d8167e7e..cc65c07a687714 100644 --- a/client/state/sites/selectors.js +++ b/client/state/sites/selectors.js @@ -1029,10 +1029,10 @@ export const hasDefaultSiteTitle = ( state, siteId ) => { * @return {Boolean} true if the site's permalinks are editable */ export function areSitePermalinksEditable( state, siteId ) { - const site = getRawSite( state, siteId ); - if ( ! site || ! site.options || ! site.options.permalink_structure ) { + const permalinkStructure = getSiteOption( state, siteId, 'permalink_structure' ); + if ( ! permalinkStructure ) { return false; } - return /\/\%postname\%\/?/.test( site.options.permalink_structure ); + return /\/\%postname\%\/?/.test( permalinkStructure ); }