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:
parent
52cfae0522
commit
201fbdfc9b
1 changed files with 3 additions and 10 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue