Tweak the GenericSheet mixin to augment meta based on if there's a document in the application

This commit is contained in:
Oliver-Akins 2025-01-01 01:26:07 -07:00
parent a6f11cf6fe
commit b8894916cd

View file

@ -27,9 +27,11 @@ export function GenericSheetMixin(HandlebarsSheet) {
delete ctx.fields; delete ctx.fields;
ctx.meta ??= {}; ctx.meta ??= {};
ctx.meta.idp = this.document.uuid; ctx.meta.idp = this.document?.uuid ?? this.id;
ctx.meta.limited = this.actor.limited; if (this.document) {
ctx.meta.limited = this.document.limited;
ctx.meta.editable = ctx.editable; ctx.meta.editable = ctx.editable;
}
delete ctx.editable; delete ctx.editable;
return ctx; return ctx;