fix: streamline state retrieval logic by removing unnecessary else blocks
This commit is contained in:
parent
ba82252dd7
commit
0e22cbf130
|
@ -111,15 +111,13 @@ export default (options: ComponentOptions) => {
|
|||
let currentTarget = target
|
||||
for (const i in valueRoute) {
|
||||
const key = valueRoute[i]
|
||||
if (Number.parseInt(i) === valueRoute.length - 1) {
|
||||
if (Number.parseInt(i) === valueRoute.length - 1)
|
||||
return currentTarget[key]
|
||||
} else {
|
||||
if (!currentTarget[key]) {
|
||||
|
||||
if (!currentTarget[key])
|
||||
currentTarget[key] = {}
|
||||
}
|
||||
currentTarget = currentTarget[key]
|
||||
}
|
||||
}
|
||||
return undefined
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user