Skip to content

Commit

Permalink
fix(files): logic error on recent files
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmcg authored and stavares843 committed May 5, 2022
1 parent cbb089f commit 1e81a0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/Files/FilSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ export class FilSystem {
* @returns {Fil[]} most recent 15 files, sorted by modified date
*/
get recentFiles(): Fil[] {
return this.flat.slice(0, 14)
return this.flat
.sort((a: Item, b: Item) => b.modified - a.modified)
.slice(0, 14)
}

/**
Expand Down

0 comments on commit 1e81a0e

Please sign in to comment.