diff --git a/packages/react-renderer/src/engine/base.jsx b/packages/react-renderer/src/engine/base.jsx index 0904cd99b..2641ddae3 100644 --- a/packages/react-renderer/src/engine/base.jsx +++ b/packages/react-renderer/src/engine/base.jsx @@ -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;