mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
🐛Fix admin demo requests 7-day average
This commit is contained in:
parent
8bc9cd5ee6
commit
8e6293824b
1 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,8 @@ module.exports = class DemoRequestsView extends RootView
|
|||
@dayCounts.push(day: day, count: count)
|
||||
@dayCounts.sort((a, b) -> b.day.localeCompare(a.day))
|
||||
sevenCounts = []
|
||||
for dayCount in @dayCounts
|
||||
for i in [@dayCounts.length - 1..0]
|
||||
dayCount = @dayCounts[i]
|
||||
sevenCounts.push(dayCount.count)
|
||||
while sevenCounts.length > 7
|
||||
sevenCounts.shift()
|
||||
|
|
Loading…
Reference in a new issue