1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-15 19:54:02 +02:00

Fix deprecated editor.change in after/onCut (#2343)

This commit is contained in:
Per-Kristian Nordnes
2018-10-28 20:18:53 +01:00
committed by Ian Storm Taylor
parent 8271cecc1e
commit 43812193ea

View File

@@ -226,11 +226,11 @@ function AfterPlugin(options = {}) {
const isVoidInline = endInline && editor.isVoid(endInline) && isCollapsed
if (isVoidBlock) {
editor.editor(c => c.removeNodeByKey(endBlock.key))
editor.removeNodeByKey(endBlock.key)
} else if (isVoidInline) {
editor.editor(c => c.removeNodeByKey(endInline.key))
editor.removeNodeByKey(endInline.key)
} else {
editor.editor(c => c.delete())
editor.delete()
}
})