Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Seungwoo321 committed Aug 22, 2024
1 parent bc4169b commit 6f487e5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions dist/vue-pivottable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@ const wn = function(e, n, o) {
return i > r ? 1 : -1;
for (i = i.match(Je), r = r.match(Je); i.length && r.length; ) {
const a = i.shift(), s = r.shift();
if (a !== s)
return oe.test(a) && oe.test(s) ? a.replace(Qe, ".0") - s.replace(Qe, ".0") : a > s ? 1 : -1;
if (a !== s) {
if (oe.test(a) && oe.test(s)) {
const l = a.replace(Qe, ".0") - s.replace(Qe, ".0");
return l !== 0 ? l : a.length - s.length;
}
return a > s ? 1 : -1;
}
}
return i.length - r.length;
}, un = function(e) {
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-pivottable.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-pivottable",
"version": "0.4.66",
"version": "0.4.67",
"main": "dist/vue-pivottable.mjs",
"files": [
"dist",
Expand Down
3 changes: 2 additions & 1 deletion src/helper/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ const naturalSort = (as, bs) => {
const b1 = b.shift()
if (a1 !== b1) {
if (rd.test(a1) && rd.test(b1)) {
return a1.replace(rz, '.0') - b1.replace(rz, '.0')
const numDiff = a1.replace(rz, '.0') - b1.replace(rz, '.0');
return (numDiff !== 0) ? numDiff : a1.length - b1.length;
}
return a1 > b1 ? 1 : -1
}
Expand Down

0 comments on commit 6f487e5

Please sign in to comment.