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:
@@ -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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user