Fix linking world item subclasses (#1987)
Some checks failed
Project CI / build (24.x) (push) Has been cancelled

This commit is contained in:
Carlos Fernandez 2026-06-11 17:22:37 -04:00 committed by GitHub
parent b884130826
commit 7a631c27a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 17 additions and 10 deletions

View file

@ -59,7 +59,7 @@ export default class SubclassSheet extends DHBaseItemSheet {
const item = await fromUuid(data.uuid);
const itemType = data.type === 'ActiveEffect' ? data.type : item.type;
if (itemType === 'class') {
const uuid = item._stats.compendiumSource ?? item.uuid;
const uuid = item.sourceUuid;
if (this.document.system.linkedClass !== uuid) {
await this.document.update({ 'system.linkedClass': uuid });
// Re-render all class sheets for instant feedback