Merge branch 'sort-transactions' of billy/budget into master
This commit is contained in:
commit
12f7edc581
1 changed files with 2 additions and 2 deletions
|
@ -13,9 +13,9 @@ export class TransactionService {
|
|||
|
||||
getTransactions(count?: number): Observable<Transaction[]> {
|
||||
if (count) {
|
||||
return from(this.db.transactions.toCollection().limit(count).toArray())
|
||||
return from(this.db.transactions.orderBy('date').reverse().limit(count).toArray())
|
||||
} else {
|
||||
return from(this.db.transactions.toCollection().toArray())
|
||||
return from(this.db.transactions.orderBy('date').reverse().toArray())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue