Update the GenericApp to be using _prepareContext instead of _preparePartContext

This commit is contained in:
Eldritch-Oliver 2025-10-12 01:42:23 -06:00
parent 7935a85188
commit f237bce4d9

View file

@ -83,10 +83,8 @@ export function GenericAppMixin(HandlebarsApp) {
}); });
}; };
async _preparePartContext(partId, ctx, opts) { async _prepareContext() {
ctx = await super._preparePartContext(partId, ctx, opts); const ctx = {};
delete ctx.document;
delete ctx.fields;
ctx.meta ??= {}; ctx.meta ??= {};
ctx.meta.idp = this.document?.uuid ?? this.id; ctx.meta.idp = this.document?.uuid ?? this.id;
@ -95,7 +93,6 @@ export function GenericAppMixin(HandlebarsApp) {
ctx.meta.editable = this.isEditable || game.user.isGM; ctx.meta.editable = this.isEditable || game.user.isGM;
ctx.meta.embedded = this.document.isEmbedded; ctx.meta.embedded = this.document.isEmbedded;
}; };
delete ctx.editable;
return ctx; return ctx;
}; };