diff --git a/docs/walkthroughs/05-executing-commands.md b/docs/walkthroughs/05-executing-commands.md index 478e592f8..de09d1ace 100644 --- a/docs/walkthroughs/05-executing-commands.md +++ b/docs/walkthroughs/05-executing-commands.md @@ -53,7 +53,7 @@ const App = () => { Transforms.setNodes( editor, { type: match ? null : 'code' }, - { match: n => Editor.isBlock(editor, n) } + { match: n => Element.isElement(n) && Editor.isBlock(editor, n) } ) break } @@ -105,7 +105,7 @@ const CustomEditor = { Transforms.setNodes( editor, { type: isActive ? null : 'code' }, - { match: n => Editor.isBlock(editor, n) } + { match: n => Element.isElement(n) && Editor.isBlock(editor, n) } ) }, }