Skip to content

Commit

Permalink
fix(hasAreaTemplate): fixed the condition that checks whether an area…
Browse files Browse the repository at this point in the history
… template exists
  • Loading branch information
SouOWendel committed Oct 9, 2024
1 parent 3380b3b commit 4dbdc4a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion module/documents/item.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,18 @@ export class ShinobiItem extends Item {
const rollMode = game.settings.get('core', 'rollMode');
// const label = `[${item.type}] ${item.name}`;
const token = this.actor.token;

let hasAreaTemplate;
hasAreaTemplate = (this.type == "tecnicas" || this.type == "gerais" || this.type == "armas");
hasAreaTemplate = this.system.areaTemplate.length !== 0;

const templateData = {
actor: this.actor,
tokenId: token?.uuid || null,
item: this,
data: await this.getChatData(),
labels: this.labels,
hasAreaTemplate: (this.type == "tecnicas" || this.type == "gerais" || this.type == "armas"),
hasAreaTemplate: hasAreaTemplate,
system: [],
info: [],
};
Expand Down

0 comments on commit 4dbdc4a

Please sign in to comment.