Browse Source

only execute that function if the cookie plugin is enabled (#4889)

Dustin Utecht 5 years ago
parent
commit
41b888de74
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/extensions/reorder-columns/bootstrap-table-reorder-columns.js

+ 3 - 1
src/extensions/reorder-columns/bootstrap-table-reorder-columns.js

@@ -129,7 +129,9 @@ $.BootstrapTable = class extends $.BootstrapTable {
         })
 
         this.columnsSortOrder = sortOrder
-        this.persistReorderColumnsState(this)
+        if (this.options.cookie) {
+          this.persistReorderColumnsState(this)
+        }
 
         const ths = []
         const formatters = []