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;
|
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.editable = ctx.editable;
|
ctx.meta.limited = this.document.limited;
|
||||||
|
ctx.meta.editable = ctx.editable;
|
||||||
|
}
|
||||||
delete ctx.editable;
|
delete ctx.editable;
|
||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue