Update the GenericApp to be using _prepareContext instead of _preparePartContext
This commit is contained in:
parent
7935a85188
commit
f237bce4d9
1 changed files with 2 additions and 5 deletions
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue