mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-01 02:41:39 -05:00
Fixed paidMembersByCadence always having keys
refs https://github.com/TryGhost/Team/issues/1601 When there is no data in the backend, no keys are added.
This commit is contained in:
parent
917f17b7e6
commit
c36a5bbaeb
1 changed files with 4 additions and 1 deletions
|
@ -344,7 +344,10 @@ export default class DashboardStatsService extends Service {
|
|||
let statsUrl = this.ghostPaths.url.api('stats/subscriptions');
|
||||
let result = yield this.ajax.request(statsUrl);
|
||||
|
||||
const paidMembersByCadence = {};
|
||||
const paidMembersByCadence = {
|
||||
month: 0,
|
||||
year: 0
|
||||
};
|
||||
|
||||
for (const cadence of result.meta.cadences) {
|
||||
paidMembersByCadence[cadence] = result.meta.totals.reduce((sum, total) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue