Fixed paid subscribers chart reloading when toggling fake data

refs https://ghost.slack.com/archives/C02G9E68C/p1651773627838629?thread_ts=1651771893.729649&cid=C02G9E68C

The chart was not reloading when the fake data toggle was changed. This code is only used when using mocked data. So if you loaded the page without mocked data, everything was working fine and the chart did show the right data. If you then enabled fake data, the chart just won’t reload and would keep showing the initial data (so it wasn’t always showing mocked data, just the initial data).
This commit is contained in:
Simon Backx 2022-05-06 14:35:13 +02:00
parent 089686132c
commit dd901c6790

View File

@ -310,9 +310,6 @@ export default class DashboardStatsService extends Service {
}
loadSubscriptionCountStats() {
if (this.paidMembersByCadence && this.paidMembersByTier && this.subscriptionCountStats) {
return;
}
if (this._loadSubscriptionCountStats.isRunning) {
// We need to explicitly wait for the already running task instead of dropping it and returning immediately
return this._loadSubscriptionCountStats.last;
@ -676,6 +673,7 @@ export default class DashboardStatsService extends Service {
this.loadMrrStats();
this.loadMemberCountStats();
this.loadSubscriptionCountStats();
this.loadLastSeen();
this.loadPaidMembersByCadence();
this.loadPaidMembersByTier();