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.
@@ -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) ?? null;
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clashofclans.js",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
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",