diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 4b5b3512..2c3f843d 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -623,11 +623,10 @@ export class RdDActorSheet extends ActorSheet { } async _onSplitItem(item, split) { - const itemData = Misc.data(item); - if (split >= 1 && split < itemData.data.quantite) { + if (split >= 1 && split < Misc.data(item).data.quantite) { await item.diminuerQuantite(split); + const itemData = duplicate( Misc.data(item)); itemData.data.quantite = split; - itemData.id = undefined; await this.actor.createEmbeddedDocuments('Item', [itemData]) } }