fix: 兼容 variable 历史数据格式

This commit is contained in:
mario.gk 2020-07-16 19:28:44 +08:00
parent af1746b0be
commit d666317d86

View File

@ -151,6 +151,14 @@ function compatiableReducer(props: any) {
},
}
}
// 为了能降级到老版本,建议在后期版本去掉以下代码
if (isJSExpression(val)) {
val = {
type: 'variable',
value: val.mock,
variable: val.value,
}
}
newProps[key] = val;
});
return newProps;