[O] Sort artworks by date

This commit is contained in:
Hykilpikonna
2019-12-23 10:24:09 -05:00
parent 348eac8ad4
commit c9ee985799
+4 -1
View File
@@ -99,7 +99,10 @@
// Add it // Add it
this.artworks.push(new Artwork(a.date, a.title, a.format)); this.artworks.push(new Artwork(a.date, a.title, a.format));
}) });
// Sort by date
this.artworks.sort((a, b) => b.date.getTime() - a.date.getTime());
} }
/** /**