Remove data I don't want in the context
This commit is contained in:
parent
bf8440e53d
commit
25db650fae
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue