fix: 修复转换 schema 双向不对等的 bug

This commit is contained in:
力皓 2021-04-02 12:06:18 +08:00
parent 2ab953db61
commit 5f851740b3
2 changed files with 9 additions and 1 deletions

View File

@ -9,9 +9,12 @@ export function compatibleReducer(props: any, node: Node) {
if (!node.componentMeta.prototype) {
return props;
}
if (!props || !isPlainObject(props)) {
if (!props || !(isPlainObject(props) || Array.isArray(props))) {
return props;
}
if (Array.isArray(props)) {
return props.map(k => compatibleReducer(k, node));
}
// 为了能降级到老版本,建议在后期版本去掉以下代码
if (isJSSlot(props)) {
return {

5
scripts/start-server.sh Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# FIXME! do not run build
lerna exec --scope @ali/lowcode-code-generator -- npm run build
# lerna exec --scope @ali/lowcode-demo-server -- npm start