Tweak the GenericSheet mixin to augment meta based on if there's a document in the application
This commit is contained in:
parent
a6f11cf6fe
commit
b8894916cd
1 changed files with 5 additions and 3 deletions
|
|
@ -27,9 +27,11 @@ export function GenericSheetMixin(HandlebarsSheet) {
|
|||
delete ctx.fields;
|
||||
|
||||
ctx.meta ??= {};
|
||||
ctx.meta.idp = this.document.uuid;
|
||||
ctx.meta.limited = this.actor.limited;
|
||||
ctx.meta.editable = ctx.editable;
|
||||
ctx.meta.idp = this.document?.uuid ?? this.id;
|
||||
if (this.document) {
|
||||
ctx.meta.limited = this.document.limited;
|
||||
ctx.meta.editable = ctx.editable;
|
||||
}
|
||||
delete ctx.editable;
|
||||
|
||||
return ctx;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue