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).
This commit is contained in:
parent
f807b59c9a
commit
7fcdcf8a5c
2 changed files with 4 additions and 2 deletions
|
@ -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(
|
||||
|
|
|
@ -5,10 +5,10 @@ SPDX-License-Identifier: MIT
|
|||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab effects" data-group="primary" data-tab="effects">
|
||||
{{#unless (isEmpty data.effects)}}
|
||||
{{#unless (isEmpty enrichedEffects)}}
|
||||
<ol class="ds4-embedded-document-list ds4-embedded-document-list--item-effect effect-list">
|
||||
{{> 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}}
|
||||
</ol>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue