Skip to content

Commit

Permalink
Lodash: Refactor post editor away from _.find() (#46432)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla authored Dec 12, 2022
1 parent 2f058ee commit ce55da3
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/edit-post/src/hooks/validate-multiple-use/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* External dependencies
*/
import { find } from 'lodash';

/**
* WordPress dependencies
*/
Expand Down Expand Up @@ -44,8 +39,7 @@ const enhance = compose(
// Otherwise, only pass `originalBlockClientId` if it refers to a different
// block from the current one.
const blocks = select( blockEditorStore ).getBlocks();
const firstOfSameType = find(
blocks,
const firstOfSameType = blocks.find(
( { name } ) => block.name === name
);
const isInvalid =
Expand Down

0 comments on commit ce55da3

Please sign in to comment.