From 7fcdcf8a5cd7545889baf22cfe65ce032898d852 Mon Sep 17 00:00:00 2001 From: Alexander Minges Date: Mon, 28 Jul 2025 22:14:41 +0200 Subject: [PATCH] fix: correct effects display in item sheet template - Fix item sheet effects template to use enrichedEffects instead of data.effects - Ensures effects are properly displayed in the item sheet effects tab - Aligns with actor sheet implementation for consistency The template was referencing data.effects but the context preparation creates enrichedEffects array with additional metadata (id, uuid, sourceName). --- src/apps/item-sheet.js | 2 ++ templates/sheets/item/tabs/effects.hbs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/apps/item-sheet.js b/src/apps/item-sheet.js index 5a05dfb4..fc2251e4 100644 --- a/src/apps/item-sheet.js +++ b/src/apps/item-sheet.js @@ -96,6 +96,8 @@ export class DS4ItemSheet extends foundry.applications.api.HandlebarsApplication } } + + // Enrich description content for display if (this.item.system.description) { context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML( diff --git a/templates/sheets/item/tabs/effects.hbs b/templates/sheets/item/tabs/effects.hbs index 0e76c5ef..070057c7 100644 --- a/templates/sheets/item/tabs/effects.hbs +++ b/templates/sheets/item/tabs/effects.hbs @@ -5,10 +5,10 @@ SPDX-License-Identifier: MIT --}}
- {{#unless (isEmpty data.effects)}} + {{#unless (isEmpty enrichedEffects)}}
    {{> systems/ds4/templates/sheets/item/components/effect-list-header.hbs}} - {{#each data.effects as |effectData id| }} + {{#each enrichedEffects as |effectData id| }} {{> systems/ds4/templates/sheets/item/components/effect-list-entry.hbs effectData=effectData}} {{/each}}