Fix ammo being consumed if the roll config dialog is canceled

This commit is contained in:
jjtParadox 2021-08-04 18:46:37 -05:00
parent 1087324154
commit 46a831e840

View file

@ -1039,7 +1039,7 @@ export default class Item5e extends Item {
// Invoke the d20 roll helper
const roll = await d20Roll(rollConfig);
if (roll === false) return null;
if (!roll) return null;
// Commit ammunition consumption on attack rolls resource consumption if the attack roll was made
if (ammo && !isObjectEmpty(ammoUpdate)) await ammo.update(ammoUpdate);