mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-13 11:44:55 +01:00
Deal with invalid range passed to getSelectionIndexes (#1443)
* Deal with invalid range in getSelectionIndexes * Use range is unset
This commit is contained in:
parent
cef33de6aa
commit
b2e0612149
@ -1405,6 +1405,11 @@ class Node {
|
||||
return null
|
||||
}
|
||||
|
||||
// if we've been given an invalid selection we can exit early.
|
||||
if (range.isUnset) {
|
||||
return null
|
||||
}
|
||||
|
||||
// PERF: if the start and end keys are the same, just check for the child
|
||||
// that contains that single key.
|
||||
if (startKey == endKey) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user