Fix bug in date sorting due to dates being moved into the .metadata property of articles
This commit is contained in:
parent
11a1ab0f7b
commit
968b221efa
1 changed files with 2 additions and 1 deletions
|
@ -76,7 +76,8 @@ function Navigation(modules) {
|
|||
|
||||
function articleIds(tag, all) {
|
||||
var ids = tag != undefined ? blog.tags[tag] : Object.keys(blog.articles);
|
||||
ids.sort(function(idA, idB) {return blog.articles[idB].date - blog.articles[idA].date;});
|
||||
var reverseDate = function (id) {return -blog.articles[id].metadata.date;};
|
||||
ids.sort(modules.fun.compare(reverseDate));
|
||||
return ids.slice(0, all ? undefined : blog.skin.previewArticlesCount);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue