Explorar el Código

fix:数据导出首次添加关键词报错处理

yangfeng hace 6 meses
padre
commit
f21fea5899
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/web/staticres/dataExport/js/conditions_order.js

+ 4 - 0
src/web/staticres/dataExport/js/conditions_order.js

@@ -639,6 +639,10 @@ $('.new-box .new-confirm').click(function () {
   // console.log(editIndex, text, appendArr, excludeArr, 'editIndex');
 
   var keyTemArr = window[arr] || []
+  if(!Array.isArray(keyTemArr)) {
+    window[arr] = []
+    keyTemArr = window[arr]
+  }
   if (type === 'edit') {
     // 如果是修改操作
     keyAllArr[editIndex].name = text