From f642294949f4e5eb8f8e5edc55ddc878019563d6 Mon Sep 17 00:00:00 2001 From: wangfengming Date: Mon, 30 Oct 2017 11:54:03 +0800 Subject: [PATCH] Table: support sort-by, use isArray to test sortBy --- packages/table/src/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/table/src/util.js b/packages/table/src/util.js index f93f14302..db3fcf652 100644 --- a/packages/table/src/util.js +++ b/packages/table/src/util.js @@ -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') {