Skip to content

Commit

Permalink
fix(MdTable): undefined table sorting #1906 (#2012)
Browse files Browse the repository at this point in the history
  • Loading branch information
cargilltay authored and marcosmoura committed May 11, 2019
1 parent a275f18 commit 5d54da5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/MdTable/MdTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@
const isAsc = this.MdTable.sortOrder === 'asc'
let isNumber = typeof aAttr === 'number'
if (!aAttr) {
return 1;
}
if(!bAttr) {
return -1
}
if (isNumber) {
return isAsc ? (aAttr - bAttr) : (bAttr - aAttr)
}
Expand Down

0 comments on commit 5d54da5

Please sign in to comment.