Mixing spaces and tabs, extra semicolons and lonely ifs are now forbidden

This commit is contained in:
BB
2022-03-11 16:32:48 +01:00
parent 372776c94e
commit 5e2ccc71ec
16 changed files with 47 additions and 85 deletions
+1 -3
View File
@@ -218,8 +218,7 @@ export function SellProduct(product: Product, city: string, amt: string, price:
product.sllman[city][0] = false;
product.sllman[city][1] = "";
}
} else {
if (all) {
} else if (all) {
for (let i = 0; i < cities.length; ++i) {
const tempCity = cities[i];
product.sllman[tempCity][0] = true;
@@ -229,7 +228,6 @@ export function SellProduct(product: Product, city: string, amt: string, price:
product.sllman[city][0] = true;
product.sllman[city][1] = qty;
}
}
}
}
+1 -3
View File
@@ -33,8 +33,7 @@ export function ThrowPartyModal(props: IProps): React.ReactElement {
function throwParty(): void {
if (cost === null || isNaN(cost) || cost < 0) {
dialogBoxCreate("Invalid value entered");
} else {
if (!canParty) {
} else if (!canParty) {
dialogBoxCreate("You don't have enough company funds to throw a party!");
} else {
const mult = ThrowParty(corp, props.office, cost);
@@ -46,7 +45,6 @@ export function ThrowPartyModal(props: IProps): React.ReactElement {
props.rerender();
props.onClose();
}
}
}
function EffectText(): React.ReactElement {