Rerender class sheets when subclass link is changed

This commit is contained in:
Carlos Fernandez 2026-05-03 18:44:48 -04:00
parent 533421abba
commit 210978fd87

View file

@ -62,6 +62,10 @@ export default class SubclassSheet extends DHBaseItemSheet {
const uuid = item._stats.compendiumSource ?? item.uuid; const uuid = item._stats.compendiumSource ?? item.uuid;
if (this.document.system.linkedClass !== uuid) { if (this.document.system.linkedClass !== uuid) {
await this.document.update({ 'system.linkedClass': uuid }); await this.document.update({ 'system.linkedClass': uuid });
// Re-render all class sheets for instant feedback
for (const app of foundry.applications.instances.values()) {
if (app.document?.type === 'class') app.render();
}
} }
return; return;
} }