1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-02 19:52:32 +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) { if (selection != null && result != null) {
selection[key] = result selection[key] = result
} else { } else {
let found = false
let prev: TextEntry | undefined let prev: TextEntry | undefined
let next: TextEntry | undefined let next: TextEntry | undefined
@@ -191,16 +190,14 @@ export const GeneralTransforms = {
} }
} }
if (!found) { if (prev) {
if (prev) { point.path = prev[1]
point.path = prev[1] point.offset = prev[0].text.length
point.offset = prev[0].text.length } else if (next) {
} else if (next) { point.path = next[1]
point.path = next[1] point.offset = 0
point.offset = 0 } else {
} else { selection = null
selection = null
}
} }
} }
} }