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