Browse Source

变更清单bug

laiguoran 4 years ago
parent
commit
fb366cb16c
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/public/js/change_set.js

+ 3 - 3
app/public/js/change_set.js

@@ -48,10 +48,10 @@ $(document).ready(() => {
         gclGatherModel.loadPosData(result.pos);
 
         gclGatherData = gclGatherModel.gatherGclData();
+        gclGatherData = _.filter(gclGatherData, function (item) {
+            return item.leafXmjs && item.leafXmjs.length !== 0;
+        });
         for (const ggd in gclGatherData) {
-            if (gclGatherData[ggd].leafXmjs && gclGatherData[ggd].leafXmjs.length === 0) {
-                gclGatherData.splice(ggd, 1);
-            }
             gclGatherData[ggd].code = gclGatherData[ggd].b_code;
         }
         // 数组去重