diff --git a/src/index.js b/src/index.js index 5c369dc..590a120 100644 --- a/src/index.js +++ b/src/index.js @@ -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; }