mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03: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
@ -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…
Reference in New Issue
Block a user