Commit f6422949 authored by wangfengming's avatar wangfengming Committed by 杨奕

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

parent 0a24f051
......@@ -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') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment