From 48c18b5368d2fec7ca16c703e9f058932622ecd2 Mon Sep 17 00:00:00 2001 From: Cyrille Perois Date: Fri, 5 May 2023 13:04:05 +0200 Subject: [PATCH] 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. --- docs/walkthroughs/03-defining-custom-elements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/walkthroughs/03-defining-custom-elements.md b/docs/walkthroughs/03-defining-custom-elements.md index 8472ea5d8..26ab208fb 100644 --- a/docs/walkthroughs/03-defining-custom-elements.md +++ b/docs/walkthroughs/03-defining-custom-elements.md @@ -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) } ) } }}