ソースを参照

fix control 报错问题

xaboy 5 年 前
コミット
8eae437631
2 ファイル変更3 行追加3 行削除
  1. 1 1
      src/Template/createScript.min.php
  2. 2 2
      src/Template/createScript.php

ファイルの差分が大きいため隠しています
+ 1 - 1
src/Template/createScript.min.php


+ 2 - 2
src/Template/createScript.php

@@ -18,8 +18,8 @@
             } else if (type === 'group') {
                 if (c.props.rules) parseRule(c.props.rules);
                 if (c.props.rule) parseRule([c.props.rule]);
-            } else if (c.control) {
-                c.forEach(function(r) {
+            } else if (c.control && c.control.length) {
+                c.control.forEach(function(r) {
                     parseRule(r.rule);
                 });
             }