Skip to content

Commit

Permalink
fix(docs): correct block matching condition in Executing Commands e…
Browse files Browse the repository at this point in the history
…xample
  • Loading branch information
jerry-lllman committed Feb 19, 2025
1 parent 7a8ab18 commit a3c8367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/walkthroughs/05-executing-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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) }
)
},
}
Expand Down

0 comments on commit a3c8367

Please sign in to comment.