0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00

Removed some unnecessary checks for Paid Mix

refs: https://github.com/TryGhost/Team/issues/1531
This commit is contained in:
James Morris 2022-05-13 15:17:25 +01:00
parent 52cfae0522
commit 201fbdfc9b

View file

@ -333,16 +333,9 @@ export default class PaidMix extends Component {
// tiers all have 0 data
if (this.areTiersAllZero) {
totalTiersAmount = 100;
if (data.length > 0) {
let equalPercentageData = Math.round(100 / data.length);
for (let i = 0; i < data.length; i++) {
data[i] = equalPercentageData;
}
} else {
labels[0] = 'Tier 1';
labels[1] = 'Tier 2';
data[0] = 50;
data[1] = 50;
let equalPercentageData = Math.round(100 / data.length);
for (let i = 0; i < data.length; i++) {
data[i] = equalPercentageData;
}
// tiers have good data
} else {