Skip to content

Commit

Permalink
some code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Promises committed Oct 9, 2021
1 parent bd197dc commit 3a9c224
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/engine/world/actor/player/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,10 @@ export class Player extends Actor {
}

const equippable = this.canEquipItem(itemDetails);
if (equippable.missingRequirements.length) {
equippable.missingRequirements.forEach( s => {this.sendMessage(s)});
if (!equippable.equipable) {
if(equippable.missingRequirements) {
equippable.missingRequirements.forEach((s) => this.sendMessage(s));
}
return;
}

Expand Down

0 comments on commit 3a9c224

Please sign in to comment.