Skip to content

Commit

Permalink
Added missing reference to lodash (#14516)
Browse files Browse the repository at this point in the history
A reference to the `omit` method of lodash is in the *Changing the innerBlocks* section, but the method is not defined in the code examples, causing confusion.
  • Loading branch information
jakeparis authored and gziolo committed Mar 20, 2019
1 parent d6ad848 commit fb8abfe
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ E.g: a block wants to migrate a title attribute to a paragraph innerBlock.
{% ES5 %}
```js
var el = wp.element.createElement,
registerBlockType = wp.blocks.registerBlockType;
registerBlockType = wp.blocks.registerBlockType,
omit = lodash.omit;

registerBlockType( 'gutenberg/block-with-deprecated-version', {

Expand Down Expand Up @@ -232,6 +233,7 @@ registerBlockType( 'gutenberg/block-with-deprecated-version', {
{% ESNext %}
```js
const { registerBlockType } = wp.blocks;
const { omit } = lodash;

registerBlockType( 'gutenberg/block-with-deprecated-version', {

Expand Down

0 comments on commit fb8abfe

Please sign in to comment.