death-save / combat-carousel

Combat Carousel Foundry VTT module
https://deathsave.dev
GNU General Public License v3.0
18 stars 21 forks source link

Can't delete Combatant from card #89

Closed eclarke12 closed 3 years ago

eclarke12 commented 3 years ago
Uncaught (in promise) Error: The key [object Object] does not exist in the EmbeddedCollection Collection
    at Map.get (collection.mjs:106)
    at ClientDatabaseBackend._preDeleteDocumentArray (foundry.js:8955)
    at ClientDatabaseBackend._deleteEmbeddedDocuments (foundry.js:8931)
    at ClientDatabaseBackend.delete (backend.mjs:214)
    at async Function.deleteDocuments (document.mjs:402)
get @ collection.mjs:106
_preDeleteDocumentArray @ foundry.js:8955
_deleteEmbeddedDocuments @ foundry.js:8931
delete @ backend.mjs:214
async function (async)
_onCombatantControl @ VM106 combat-carousel.mjs:815
(anonymous) @ VM106 combat-carousel.mjs:398
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2

Need to pass an array of Ids not objects to embeddedEntity.delete Also add a dialog confirming deletion

eclarke12 commented 3 years ago

Fixed by #100