Browse Source

Fix condition to add levels in showSortModal

dimbslmh 10 years ago
parent
commit
f790c793c1
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

+ 5 - 3
src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

@@ -141,9 +141,11 @@
                 }
             }
             
-            if ($rows.length < that.options.sortPriority.length && typeof that.options.sortPriority === 'object') {
-                for (var i = 0; i < that.options.sortPriority.length; i++) {
-                    that.addLevel(i, that.options.sortPriority[i]);
+            if (that.options.sortPriority !== null) {
+                if ($rows.length < that.options.sortPriority.length && typeof that.options.sortPriority === 'object') {
+                    for (var i = 0; i < that.options.sortPriority.length; i++) {
+                        that.addLevel(i, that.options.sortPriority[i]);
+                    }
                 }
             } else {
                 that.addLevel(0);