Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad9b1fd

Browse files
committed
Fix order of progress for level superior to x.9
Related to GitbookIO/gitbook.io#23
1 parent d245895 commit ad9b1fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/parse/progress.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var calculProgress = function(navigation, current) {
1212
return nav;
1313
})
1414
.sortBy(function(nav) {
15-
return nav.level;
15+
return parseFloat(nav.level);
1616
})
1717
.map(function(nav, i) {
1818
// Calcul percent
@@ -27,7 +27,7 @@ var calculProgress = function(navigation, current) {
2727
} else if (done) {
2828
prevPercent = nav.percent;
2929
}
30-
30+
3131
return nav;
3232
})
3333
.value();

0 commit comments

Comments
 (0)