Browse Source

Merge pull request #7373 from weibangtuo/fix/7372

fix/7353  fix _toggleColumn exception when column size change
文翼 1 year ago
parent
commit
50d9c35cc1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

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