djhvscf 5 years ago
parent
commit
2853e87bf5
1 changed files with 8 additions and 6 deletions
  1. 8 6
      src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

+ 8 - 6
src/extensions/multiple-sort/bootstrap-table-multiple-sort.js

@@ -618,20 +618,22 @@ BootstrapTable.prototype.onMultipleSort = function () {
       if (aa === undefined || aa === null) {
       if (aa === undefined || aa === null) {
         aa = ''
         aa = ''
       }
       }
+
       if (bb === undefined || bb === null) {
       if (bb === undefined || bb === null) {
         bb = ''
         bb = ''
       }
       }
+
       if ($.isNumeric(aa) && $.isNumeric(bb)) {
       if ($.isNumeric(aa) && $.isNumeric(bb)) {
         aa = parseFloat(aa)
         aa = parseFloat(aa)
         bb = parseFloat(bb)
         bb = parseFloat(bb)
-      }
-      if (typeof aa !== 'string') {
+      } else {
         aa = aa.toString()
         aa = aa.toString()
-      }
+        bb = bb.toString()
 
 
-      if (that.options.multiSortStrictSearch) {
-        aa = aa.toLowerCase()
-        bb = bb.toLowerCase()
+        if (that.options.multiSortStrictSearch) {
+          aa = aa.toLowerCase()
+          bb = bb.toLowerCase()
+        }
       }
       }
 
 
       arr1.push(
       arr1.push(