Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})
let isPrevInVoid = false
if (prevEntry) {
const [, prevPath] = prevEntry
isPrevInVoid = document.hasVoidParent(prevPath, editor)
}
if (hasVoidParent || isPrevInVoid || startText.text === '') {
event.preventDefault()
return editor.moveFocusBackward()
}
}
if (Hotkeys.isExtendForward(event)) {
const startText = document.getNode(start.path)
const [nextEntry] = document.texts({ path: start.path })
let isNextInVoid = false
if (nextEntry) {
const [, nextPath] = nextEntry
isNextInVoid = document.hasVoidParent(nextPath, editor)
}
if (hasVoidParent || isNextInVoid || startText.text === '') {
event.preventDefault()
return editor.moveFocusForward()
}
}
next()