Set card created on actor to first valid domain (#1372)

This commit is contained in:
Carlos Fernandez 2025-12-06 14:07:43 -08:00 committed by GitHub
parent c846c5bc85
commit 6ae00e15bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -662,6 +662,9 @@ export default function DHApplicationMixin(Base) {
};
if (inVault) data['system.inVault'] = true;
if (disabled) data.disabled = true;
if (type === "domainCard" && parent?.system.domains?.length) {
data.system.domain = parent.system.domains[0];
}
const doc = await cls.create(data, { parent, renderSheet: !event.shiftKey });
if (parentIsItem && type === 'feature') {