浏览代码

Fix #3487, #3486: return when fieldIndex is -1

zhixin 8 年之前
父节点
当前提交
78f1c3278d
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/bootstrap-table.js

+ 4 - 0
src/bootstrap-table.js

@@ -1983,6 +1983,10 @@
             var field = that.header.fields[i],
                 fieldIndex = $.inArray(field, that.getVisibleFields());
 
+            if (fieldIndex === -1) {
+                return;
+            }
+
             if (that.options.detailView && !that.options.cardView) {
                 fieldIndex += 1;
             }