GH-76
- Closes #76 - Fixes the "Add multiple items" bug When multiple items were added, the foreach mechanism caused the actor to update multiple times and rewrite previously added items. That's where some items were not actually added to an Actor (the UI was working fine but not the backend part). So it seemed that items are added (you can see them on the UI) but actuallythey were not. Now everything should work fine.
This commit is contained in:
parent
0d244c785e
commit
009b731b7e
|
@ -88,9 +88,7 @@ export class BladesSheet extends ActorSheet {
|
|||
|
||||
items_to_add.push(items.find(e => e._id === $(this).val()));
|
||||
});
|
||||
items_to_add.forEach(e => {
|
||||
this.actor.createEmbeddedEntity("OwnedItem", duplicate(e));
|
||||
});
|
||||
this.actor.createEmbeddedEntity("OwnedItem", items_to_add);
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
|
||||
|
|
Loading…
Reference in a new issue