Skip to content

Commit

Permalink
Prevent Firefox error on null value (#18455)
Browse files Browse the repository at this point in the history
  • Loading branch information
frontdevde authored Nov 12, 2019
1 parent e9fcbdc commit 2102309
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-editor/src/components/block-navigation/list.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { map } from 'lodash';
import { isNil, map, omitBy } from 'lodash';
import classnames from 'classnames';

/**
Expand Down Expand Up @@ -59,7 +59,7 @@ export default function BlockNavigationList( {
*/
/* eslint-disable jsx-a11y/no-redundant-roles */
<ul className="editor-block-navigation__list block-editor-block-navigation__list" role="list">
{ map( blocks, ( block ) => {
{ map( omitBy( blocks, isNil ), ( block ) => {
const blockType = getBlockType( block.name );
const isSelected = block.clientId === selectedBlockClientId;

Expand Down

0 comments on commit 2102309

Please sign in to comment.