Skip to content

Commit

Permalink
fix: get property of string type variable caused page crash (#12969)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamjoel authored Jan 23, 2025
1 parent fd4afe0 commit f565f08
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,9 @@ 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)
if (Array.isArray(curr))
curr = curr?.find((v: any) => v.variable === key)

if (isLast) {
type = curr?.type
}
Expand Down

0 comments on commit f565f08

Please sign in to comment.