MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / hasLoop

Method hasLoop

packages/designer/src/document/node/node.ts:741–754  ·  view source on GitHub ↗

* has loop when 1. loop is validArray with length > 1 ; OR 2. loop is variable object * @return boolean, has loop config or not

()

Source from the content-addressed store, hash-verified

739 * @return boolean, has loop config or not
740 */
741 hasLoop() {
742 const value = this.getExtraProp('loop', false)?.getValue();
743 if (value === undefined || value === null) {
744 return false;
745 }
746
747 if (Array.isArray(value)) {
748 return true;
749 }
750 if (isJSExpression(value)) {
751 return true;
752 }
753 return false;
754 }
755
756 /* istanbul ignore next */
757 wrapWith(schema: Schema) {

Callers

nothing calls this directly

Calls 3

getExtraPropMethod · 0.95
getValueMethod · 0.65
isJSExpressionFunction · 0.50

Tested by

no test coverage detected