clashofclans.js 2.8.0-dev.11ea070 → 2.8.0-dev.41c401c

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.
@@ -124,7 +124,9 @@ class Client extends events_1.EventEmitter {
124
124
  if (args.round && args.round in Constants_1.CWLRounds) {
125
125
  return wars.find((war) => war.clan.tag === args.clanTag && war.state === state) ?? null;
126
126
  }
127
- return wars.find((war) => war.clan.tag === args.clanTag && war.state === state) ?? wars.at(0) ?? null;
127
+ return (wars.find((war) => war.clan.tag === args.clanTag && war.state === state) ??
128
+ wars.find((war) => war.clan.tag === args.clanTag) ??
129
+ null);
128
130
  }
129
131
  /** Returns active wars (last 2) of the CWL group. */
130
132
  async getLeagueWars(clanTag, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clashofclans.js",
3
- "version": "2.8.0-dev.11ea070",
3
+ "version": "2.8.0-dev.41c401c",
4
4
  "description": "JavaScript library for interacting with the Clash of Clans API",
5
5
  "author": "SUVAJIT <suvajit.me@gmail.com>",
6
6
  "license": "MIT",