浏览代码

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

Dustin Utecht 5 年之前
父节点
当前提交
41b888de74
共有 1 个文件被更改,包括 3 次插入1 次删除
  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 = []