mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 08:52:12 +00:00
fix build errors due to bad merge
This commit is contained in:
@@ -89,7 +89,9 @@ export class Leaderboard extends LitElement implements Layer {
|
||||
|
||||
switch (this._sortKey) {
|
||||
case "gold":
|
||||
sorted = sorted.sort((a, b) => compare(a.gold(), b.gold()));
|
||||
sorted = sorted.sort((a, b) =>
|
||||
compare(Number(a.gold()), Number(b.gold())),
|
||||
);
|
||||
break;
|
||||
case "troops":
|
||||
sorted = sorted.sort((a, b) => compare(a.troops(), b.troops()));
|
||||
|
||||
@@ -31,8 +31,7 @@ export class DonateTroopsExecution implements Execution {
|
||||
this.troops = mg.config().defaultDonationAmount(this.sender);
|
||||
}
|
||||
const maxDonation =
|
||||
mg.config().maxPopulation(this.recipient) -
|
||||
this.recipient.totalPopulation();
|
||||
mg.config().maxPopulation(this.recipient) - this.recipient.population();
|
||||
this.troops = Math.min(this.troops, maxDonation);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user