Skip to content

Commit

Permalink
fix: don't crash if there are more layout plugins than content plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
macrozone committed Jan 6, 2020
1 parent 3f7186c commit cb918c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ui/src/Trash/index.tsx
Expand Up @@ -93,8 +93,10 @@ const types = ({ editor }: { editor: Editor }) => {
...Object.keys(editor.plugins.plugins.content),
].map(
(p: string) =>
editor.plugins.plugins.content[p].name ||
editor.plugins.plugins.layout[p].name
(editor.plugins.plugins.content[p] &&
editor.plugins.plugins.content[p].name) ||
(editor.plugins.plugins.layout[p] &&
editor.plugins.plugins.layout[p].name)
);

if (editor.plugins.hasNativePlugin()) {
Expand Down

0 comments on commit cb918c6

Please sign in to comment.