diff --git a/packages/edit-post/src/store/selectors.js b/packages/edit-post/src/store/selectors.js index 981c3032ff99cb..30221f8053685c 100644 --- a/packages/edit-post/src/store/selectors.js +++ b/packages/edit-post/src/store/selectors.js @@ -260,7 +260,8 @@ export function isMetaBoxLocationVisible( state, location ) { * @return {boolean} Whether the meta box location is active. */ export function isMetaBoxLocationActive( state, location ) { - return getMetaBoxesPerLocation( state, location ).length !== 0; + const metaBoxes = getMetaBoxesPerLocation( state, location ); + return !! metaBoxes && metaBoxes.length !== 0; } /**