in Ox.api, only sort if more than two items

This commit is contained in:
rolux 2012-04-01 23:02:19 +02:00
parent cd6bca7d6b
commit 803985a160

View file

@ -235,7 +235,7 @@ Ox.api = function(items, options) {
} else {
result.data.items = Ox.clone(items);
}
if (options.sort) {
if (options.sort && result.data.items.length > 1) {
// sort
options.sort = parseSort(Ox.merge(options.sort, api.sort));
options.sort.forEach(function(v) {