Commit 0a24f051 authored by wangfengming's avatar wangfengming Committed by 杨奕

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

parent 7074a247
...@@ -28,7 +28,7 @@ export const orderBy = function(array, sortKey, reverse, sortMethod, sortBy) { ...@@ -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) {
......
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