mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Fixed usage of nullish coalescing in dashboard mocking (missing file)
This commit is contained in:
parent
4f52acd433
commit
e2ad6e9366
1 changed files with 5 additions and 3 deletions
|
@ -291,10 +291,12 @@ export default class DashboardMocksService extends Service {
|
||||||
negativeDelta: data.paidCanceled
|
negativeDelta: data.paidCanceled
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const lastStat = stats[stats.length - 1];
|
||||||
const currentCounts = {
|
const currentCounts = {
|
||||||
total: (stats[stats.length - 1]?.paid ?? 0) + (stats[stats.length - 1]?.free ?? 0) + (stats[stats.length - 1]?.comped ?? 0),
|
total: lastStat.paid + lastStat.free + lastStat.comped,
|
||||||
paid: stats[stats.length - 1]?.paid ?? 0,
|
paid: lastStat.paid,
|
||||||
free: (stats[stats.length - 1]?.free ?? 0) + (stats[stats.length - 1]?.comped ?? 0)
|
free: lastStat.free + lastStat.comped
|
||||||
};
|
};
|
||||||
|
|
||||||
const cadenceRate = Math.random();
|
const cadenceRate = Math.random();
|
||||||
|
|
Loading…
Add table
Reference in a new issue