Skip to content

Commit

Permalink
fix: 判空
Browse files Browse the repository at this point in the history
  • Loading branch information
Scorpion1221 committed Jun 26, 2024
1 parent e8b24d4 commit bcea0fb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,12 @@ export const getVarType = ({
else {
(valueSelector as ValueSelector).slice(1).forEach((key, i) => {
const isLast = i === valueSelector.length - 2
curr = curr.find((v: any) => v.variable === key)
curr = curr?.find((v: any) => v.variable === key)
if (isLast) {
type = curr?.type
}
else {
if (curr.type === VarType.object)
if (curr && curr.type === VarType.object)
curr = curr.children
}
})
Expand Down

0 comments on commit bcea0fb

Please sign in to comment.