Skip to content

Commit

Permalink
fix(items): correct opening items with blank qualities (#1399)
Browse files Browse the repository at this point in the history
  • Loading branch information
wrycu authored Apr 6, 2024
1 parent 2280521 commit 84a36ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/items/item-ffg.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ export class ItemFFG extends ItemBaseFFG {
// General equipment properties
else if (this.type !== "talent") {
if (data.hasOwnProperty("adjusteditemmodifier")) {
const qualities = data.adjusteditemmodifier?.map((m) => `<li class='item-pill ${m.adjusted ? "adjusted hover" : ""}' data-item-embed-type='itemmodifier' data-item-embed-name='${m.name}' data-item-embed-img='${m.img}' data-item-embed-description='${escape(m.system.description)}' data-item-embed-modifiers='${JSON.stringify(m.system.attributes)}' data-item-embed-rank='${m.system.rank_current}' data-item-embed='true'>${m.name} ${m.system?.rank_current > 0 ? m.system.rank_current : ""} ${m.adjusted ? "<div class='tooltip2'>" + game.i18n.localize("SWFFG.FromAttachment") + "</div>" : ""}</li>`);
const modifiers = data.adjusteditemmodifier?.filter(i => Object.keys(i).length > 0);
const qualities = modifiers?.map((m) => `<li class='item-pill ${m.adjusted ? "adjusted hover" : ""}' data-item-embed-type='itemmodifier' data-item-embed-name='${m.name}' data-item-embed-img='${m.img}' data-item-embed-description='${escape(m.system.description)}' data-item-embed-modifiers='${JSON.stringify(m.system.attributes)}' data-item-embed-rank='${m.system.rank_current}' data-item-embed='true'>${m.name} ${m.system?.rank_current > 0 ? m.system.rank_current : ""} ${m.adjusted ? "<div class='tooltip2'>" + game.i18n.localize("SWFFG.FromAttachment") + "</div>" : ""}</li>`);

props.push(`<div>${game.i18n.localize("SWFFG.ItemDescriptors")}: <ul>${qualities.join("")}<ul></div>`);
}
Expand Down

0 comments on commit 84a36ff

Please sign in to comment.