Table: support sort-by, use isArray to test sortBy

pull/7900/head
wangfengming 2017-10-30 11:50:26 +08:00 committed by 杨奕
parent 7074a247f4
commit 0a24f05125
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ export const orderBy = function(array, sortKey, reverse, sortMethod, sortBy) {
} }
const getKey = sortMethod ? null : function(value, index) { const getKey = sortMethod ? null : function(value, index) {
if (sortBy) { if (sortBy) {
if (!Array.isArray) { if (!Array.isArray(sortBy)) {
sortBy = [sortBy]; sortBy = [sortBy];
} }
return sortBy.map(function(by) { return sortBy.map(function(by) {