Skip to content

Commit

Permalink
Fix: Unregistering a block type causes blocks that convert to it to b…
Browse files Browse the repository at this point in the history
…reak the editor (#12192)
  • Loading branch information
jorgefilipecosta authored Nov 21, 2018
1 parent 43bb1ed commit 89f8897
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/src/components/block-switcher/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class BlockSwitcher extends Component {
const possibleBlockTransformations = orderBy(
filter(
getPossibleBlockTransformations( blocks ),
( block ) => !! itemsByName[ block.name ]
( block ) => block && !! itemsByName[ block.name ]
),
( block ) => itemsByName[ block.name ].frecency,
'desc'
Expand Down

0 comments on commit 89f8897

Please sign in to comment.