Merge branch 'main' into feature/chat-message-styles

This commit is contained in:
Dapoolp 2025-08-02 03:23:45 +02:00
commit 53ba65df07
2 changed files with 15 additions and 21 deletions

View file

@ -416,17 +416,17 @@ export default function DHApplicationMixin(Base) {
static async #createDoc(event, target) {
const { documentClass, type, inVault, disabled } = target.dataset;
const parentIsItem = this.document.documentName === 'Item';
const parent =
this.document.parent?.type === 'character'
? this.document.parent
: parentIsItem && documentClass === 'Item'
? type === 'action'
? this.document.system
: null
: this.document;
const featureOnCharacter = this.document.parent?.type === 'character' && type === 'feature';
const parent = featureOnCharacter
? this.document.parent
: parentIsItem && documentClass === 'Item'
? type === 'action'
? this.document.system
: null
: this.document;
let systemData = {};
if (parent?.type === 'character' && type === 'feature') {
if (featureOnCharacter) {
systemData = {
originItemType: this.document.type,
originId: this.document.id,