Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tinybeans committed Jun 28, 2015
2 parents 1b3ffca + 3ad2a66 commit 1cd50ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flexibleSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@
var limitIdx = Number(limit) + Number(offset);
resultJSON.totalResults = cloneItems.length;
// Sort
if (sortBy !== "" && sortBy in cloneItems[0]) {
if (resultJSON.totalResults !== 0 && sortBy !== "" && sortBy in cloneItems[0]) {
if (sortOrder !== "ascend") {
sortOrder = "descend";
}
Expand Down
Loading

0 comments on commit 1cd50ef

Please sign in to comment.