We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd1e14b commit 0f82aceCopy full SHA for 0f82ace
src/components/MdTable/MdTable.vue
@@ -113,14 +113,12 @@
113
let isNumber = typeof aAttr === 'number'
114
115
if (isNumber) {
116
- return isAsc ? (bAttr - aAttr) : (aAttr - bAttr)
+ return isAsc ? (aAttr - bAttr) : (bAttr - aAttr)
117
}
118
119
- if (isAsc) {
120
- return bAttr.localeCompare(aAttr)
121
- }
122
-
123
- return aAttr.localeCompare(bAttr)
+ return isAsc ?
+ aAttr.localeCompare(bAttr) :
+ bAttr.localeCompare(aAttr)
124
})
125
126
},
0 commit comments