Skip to content

Commit f1b8a55

Browse files
authored
Fix ordering children within a group
Array’s sort method expects a number, not a boolean.
1 parent 0219141 commit f1b8a55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/make_default_helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ module.exports = function(docMap, config, getCurrent, Handlebars){
141141

142142
// Sort by docObject "ordered" property
143143
ordered.sort(function(x,y) {
144-
return x.docObject.order > y.docObject.order;
144+
return x.docObject.order - y.docObject.order;
145145
});
146146

147147
// Insert ordered items to their index in the alphabetical array

0 commit comments

Comments
 (0)