Skip to content

Commit

Permalink
Made file sorting a little more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed May 24, 2018
1 parent 5c70efb commit a97c836
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,7 @@ const renderDirectory = async (current, acceptsJSON, handlers, config, paths) =>
return -1;
}

if (bIsDir && !aIsDir) {
return 1;
}

if (a.base > b.base) {
if ((bIsDir && !aIsDir) || (a.base > b.base)) {
return 1;
}

Expand Down

0 comments on commit a97c836

Please sign in to comment.