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

cleanup unnecessary variable

This commit is contained in:
Ian Storm Taylor
2019-12-13 16:06:27 -05:00
parent e0176a99a3
commit 3d4b964444

View File

@@ -178,7 +178,6 @@ export const GeneralTransforms = {
if (selection != null && result != null) {
selection[key] = result
} else {
let found = false
let prev: TextEntry | undefined
let next: TextEntry | undefined
@@ -191,16 +190,14 @@ export const GeneralTransforms = {
}
}
if (!found) {
if (prev) {
point.path = prev[1]
point.offset = prev[0].text.length
} else if (next) {
point.path = next[1]
point.offset = 0
} else {
selection = null
}
if (prev) {
point.path = prev[1]
point.offset = prev[0].text.length
} else if (next) {
point.path = next[1]
point.offset = 0
} else {
selection = null
}
}
}