1
0
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:
Cyrille Perois
2023-05-05 13:04:05 +02:00
committed by GitHub
parent 33a1e9b923
commit 48c18b5368

View File

@@ -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) }
)
}
}}