clashofclans.js 2.8.1 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/Client.js +3 -1
- package/package.json +1 -1
package/dist/client/Client.js
CHANGED
|
@@ -131,7 +131,9 @@ class Client extends events_1.EventEmitter {
|
|
|
131
131
|
if (args.round && args.round in Constants_1.CWL_ROUNDS) {
|
|
132
132
|
return wars.find((war) => war.clan.tag === args.clanTag && war.state === state) ?? null;
|
|
133
133
|
}
|
|
134
|
-
return wars.find((war) => war.clan.tag === args.clanTag) ??
|
|
134
|
+
return (wars.find((war) => war.clan.tag === args.clanTag && war.state === state) ??
|
|
135
|
+
wars.find((war) => war.clan.tag === args.clanTag) ??
|
|
136
|
+
null);
|
|
135
137
|
}
|
|
136
138
|
/** Returns active wars (last 2) of the CWL group. */
|
|
137
139
|
async getLeagueWars(clanTag, options) {
|