mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-17 12:41:44 +02:00
docs(walkthroughs): fix broken code example (#5409)
The `match` condition was updated between two examples. The later didn't work because it was missing a part of the condition.
This commit is contained in:
@@ -214,7 +214,7 @@ const App = () => {
|
||||
Transforms.setNodes(
|
||||
editor,
|
||||
{ type: match ? 'paragraph' : 'code' },
|
||||
{ match: n => Editor.isBlock(editor, n) }
|
||||
{ match: n => Element.isElement(n) && Editor.isBlock(editor, n) }
|
||||
)
|
||||
}
|
||||
}}
|
||||
|
Reference in New Issue
Block a user