1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-18 05:01:17 +02:00

Remove unused startOffset

This commit is contained in:
Francesco Agnoletto
2018-02-05 18:26:44 +01:00
parent 8e6f0567b4
commit e902fa1acb

View File

@@ -944,7 +944,7 @@ Changes.setBlockAtRange = (change, range, properties, options = {}) => {
const blocks = document.getBlocksAtRange(range)
let { startKey, startOffset, endKey, endOffset } = range
let { startKey, endKey, endOffset } = range
let isStartVoid = document.hasVoidParent(startKey)
let isEndVoid = document.hasVoidParent(endKey)
let startBlock = document.getClosestBlock(startKey)
@@ -954,7 +954,6 @@ Changes.setBlockAtRange = (change, range, properties, options = {}) => {
// selection extends into the start of the end node, we actually want to
// ignore that for UX reasons.
const isHanging = (
startOffset == 0 &&
endOffset == 0 &&
isStartVoid == false &&
startKey == startBlock.getFirstText().key &&