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

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

View File

@ -18,7 +18,7 @@ const isObject = function(obj) {
};
export const orderBy = function(array, sortKey, reverse, sortMethod, sortBy) {
if (!sortKey && !sortMethod && (!sortBy || Array.isArray && !sortBy.length)) {
if (!sortKey && !sortMethod && (!sortBy || Array.isArray(sortBy) && !sortBy.length)) {
return array;
}
if (typeof reverse === 'string') {