From 25db650fae985be94b4cafecc2a67c9424a7f806 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 28 Dec 2024 17:42:40 -0700 Subject: [PATCH] Remove data I don't want in the context --- module/Apps/ActorSheets/HeroSummaryCardV1.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/Apps/ActorSheets/HeroSummaryCardV1.mjs b/module/Apps/ActorSheets/HeroSummaryCardV1.mjs index 021e9bc..3004dba 100644 --- a/module/Apps/ActorSheets/HeroSummaryCardV1.mjs +++ b/module/Apps/ActorSheets/HeroSummaryCardV1.mjs @@ -40,9 +40,13 @@ export class HeroSummaryCardV1 extends HandlebarsApplicationMixin(ActorSheetV2) // #region Lifecycle async _preparePartContext(partId, ctx, opts) { ctx = await super._preparePartContext(partId, ctx, opts); + delete ctx.document; + delete ctx.fields; ctx.meta ??= {}; ctx.meta.idp = this.document.uuid; + ctx.meta.editable = ctx.editable; + delete ctx.editable; ctx.actor = this.document; @@ -81,7 +85,7 @@ export class HeroSummaryCardV1 extends HandlebarsApplicationMixin(ActorSheetV2) { value: ctx.actor.system.ability[key] }, ), value: ctx.actor.system.ability[key], - readonly: !ctx.editable, + readonly: !ctx.meta.editable, }); }; return ctx;