Skip to content

Commit

Permalink
Use lodash includes in the isEditorSidebarOpened selector.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Mar 9, 2018
1 parent 590ca22 commit 21c956f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions edit-post/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import createSelector from 'rememo';
import { some } from 'lodash';
import { includes, some } from 'lodash';

/**
* Internal dependencies
Expand All @@ -29,7 +29,7 @@ export function getEditorMode( state ) {
export function isEditorSidebarOpened( state ) {
const activeGeneralSidebar = getPreference( state, 'activeGeneralSidebar', null );

return [ 'edit-post/document', 'edit-post/block' ].includes( activeGeneralSidebar );
return includes( [ 'edit-post/document', 'edit-post/block' ], activeGeneralSidebar );
}

/**
Expand Down

0 comments on commit 21c956f

Please sign in to comment.