Skip to content

Commit a3c8367

Browse files
committed
fix(docs): correct block matching condition in Executing Commands example
1 parent 7a8ab18 commit a3c8367

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/walkthroughs/05-executing-commands.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const App = () => {
5353
Transforms.setNodes(
5454
editor,
5555
{ type: match ? null : 'code' },
56-
{ match: n => Editor.isBlock(editor, n) }
56+
{ match: n => Element.isElement(n) && Editor.isBlock(editor, n) }
5757
)
5858
break
5959
}
@@ -105,7 +105,7 @@ const CustomEditor = {
105105
Transforms.setNodes(
106106
editor,
107107
{ type: isActive ? null : 'code' },
108-
{ match: n => Editor.isBlock(editor, n) }
108+
{ match: n => Element.isElement(n) && Editor.isBlock(editor, n) }
109109
)
110110
},
111111
}

0 commit comments

Comments
 (0)