ソースを参照

Fix #7353: fix _toggleColumn exception when hideColumn column name not exists

weibangtuo 1 年間 前
コミット
e1aa3d966b
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

@@ -2859,7 +2859,7 @@ class BootstrapTable {
   }
 
   _toggleColumn (index, checked, needUpdate) {
-    if (index === -1 || this.columns[index].visible === checked) {
+    if (index === undefined || this.columns[index].visible === checked) {
       return
     }
     this.columns[index].visible = checked