Commit 0966662d authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

Table: allow omitting prop if sort-method is provided

parent aae78193
......@@ -21,7 +21,7 @@ export const orderBy = function(array, sortKey, reverse, sortMethod) {
if (typeof reverse === 'string') {
reverse = reverse === 'descending' ? -1 : 1;
}
if (!sortKey) {
if (!sortKey && !sortMethod) {
return array;
}
const order = (reverse && reverse < 0) ? -1 : 1;
......
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