Skip to content

Commit

Permalink
Fix small bug in isMetaBoxLocationActive
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Oct 18, 2018
1 parent 57ef63c commit 673750e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/edit-post/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 673750e

Please sign in to comment.