fix: get property og string type cause page crash

hotfix/get-property-of-string-type-cause-page-crash
Joel 1 year ago
parent 1e73f63ff8
commit 234ed25656

@ -546,6 +546,7 @@ export const getVarType = ({
else { else {
(valueSelector as ValueSelector).slice(1).forEach((key, i) => { (valueSelector as ValueSelector).slice(1).forEach((key, i) => {
const isLast = i === valueSelector.length - 2 const isLast = i === valueSelector.length - 2
if (Array.isArray(curr))
curr = curr?.find((v: any) => v.variable === key) curr = curr?.find((v: any) => v.variable === key)
if (isLast) { if (isLast) {
type = curr?.type type = curr?.type

Loading…
Cancel
Save