Skip to content

Commit

Permalink
fix: super troop level issue below town hall 11 (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
csuvajit committed Feb 27, 2024
1 parent cf26579 commit 0db129d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clashofclans.js",
"version": "3.3.2",
"version": "3.3.3",
"description": "JavaScript library for interacting with the Clash of Clans API",
"author": "https://clashofclans.js.org",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/struct/Unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class Unit {
const rawSuperUnit = RawData.RawSuperUnits.find((unit) => unit.name === this.name && this.isHomeBase);
const rawUnit = RawData.RawUnits.find((unit) => unit.name === this.name && unit.village === this.village);

if (rawSuperUnit) {
if (rawSuperUnit && data.townHallLevel >= 11) {
this.id = rawSuperUnit.id;
this.housingSpace = rawSuperUnit.housingSpace;

Expand Down

1 comment on commit 0db129d

@csuvajit
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for clashofclans-js ready!

✅ Preview
https://clashofclans-q32t2n7xn-csuvajit.vercel.app

Built with commit 0db129d.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.