1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-30 10:29:48 +02:00

Use key instead of node arguments in some places

This commit is contained in:
Soreine
2016-11-09 16:28:05 +01:00
parent 1ec6ebacc8
commit 8ed065e0b5

View File

@@ -493,13 +493,13 @@ function Plugin(options = {}) {
if (state.isExpanded) return
const { document, startText } = state
const hasVoidParent = document.hasVoidParent(startText)
const hasVoidParent = document.hasVoidParent(startText.key)
if (
startText.text == '' ||
hasVoidParent
) {
const previousText = document.getPreviousText(startText)
const previousText = document.getPreviousText(startText.key)
if (!previousText) return
debug('onKeyDownLeft', { data })