mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
🐛Fix admin dashboard invoice sorting
Bug was introduced by recent perf work.
This commit is contained in:
parent
dc4437e9f5
commit
08eff2b489
1 changed files with 3 additions and 1 deletions
|
@ -177,7 +177,9 @@ class SubscriptionHandler extends Handler
|
|||
processInvoices null, (err) =>
|
||||
return @sendDatabaseError(res, err) if err
|
||||
subMap = {}
|
||||
for invoiceID, invoice of @invoices
|
||||
invoices = (invoice for invoiceID, invoice of @invoices)
|
||||
invoices.sort (a, b) -> if a.date > b.date then -1 else 1
|
||||
for invoice in invoices
|
||||
subID = invoice.subscriptionID
|
||||
if subID of subMap
|
||||
subMap[subID].first = invoice.date
|
||||
|
|
Loading…
Reference in a new issue