Skip to content

Commit

Permalink
Use lodash implementation of includes() for IE11 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Apr 25, 2018
1 parent 1c6e693 commit f7108b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/components/post-format/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { find, get, union } from 'lodash';
import { find, get, includes, union } from 'lodash';

/**
* WordPress dependencies
Expand Down Expand Up @@ -32,7 +32,7 @@ const POST_FORMATS = [

function PostFormat( { onUpdatePostFormat, postFormat = 'standard', supportedFormats, suggestedFormat, instanceId } ) {
const postFormatSelectorId = 'post-format-selector-' + instanceId;
const formats = POST_FORMATS.filter( ( format ) => supportedFormats.includes( format.id ) );
const formats = POST_FORMATS.filter( ( format ) => includes( supportedFormats, format.id ) );
const suggestion = find( formats, ( format ) => format.id === suggestedFormat );

// Disable reason: We need to change the value immiediately to show/hide the suggestion if needed
Expand Down

0 comments on commit f7108b8

Please sign in to comment.