1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-01 19:22:35 +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 if (state.isExpanded) return
const { document, startText } = state const { document, startText } = state
const hasVoidParent = document.hasVoidParent(startText) const hasVoidParent = document.hasVoidParent(startText.key)
if ( if (
startText.text == '' || startText.text == '' ||
hasVoidParent hasVoidParent
) { ) {
const previousText = document.getPreviousText(startText) const previousText = document.getPreviousText(startText.key)
if (!previousText) return if (!previousText) return
debug('onKeyDownLeft', { data }) debug('onKeyDownLeft', { data })