Merge branch 'fix/minor-bugs-lianjie.lj' into 'release/0.9.6'

画布loop问题修复



See merge request !938265
This commit is contained in:
力皓 2020-08-18 13:38:52 +08:00
commit 631de13c20

View File

@ -234,15 +234,18 @@ export default class BaseEngine extends PureComponent {
}
if (schema.loop != null) {
return this.__createLoopVirtualDom(
{
...schema,
loop: parseData(schema.loop, self),
},
self,
parentInfo,
idx,
);
const loop = parseData(schema.loop, self);
if (Array.isArray(loop) && loop.length > 0 || isJSExpression(loop)) {
return this.__createLoopVirtualDom(
{
...schema,
loop,
},
self,
parentInfo,
idx,
);
}
}
const condition = schema.condition == null ? true : parseData(schema.condition, self);
if (!condition) return null;