From 46a831e840fe30db458b0608084c8fe6e4b29a40 Mon Sep 17 00:00:00 2001 From: jjtParadox Date: Wed, 4 Aug 2021 18:46:37 -0500 Subject: [PATCH] Fix ammo being consumed if the roll config dialog is canceled --- module/item/entity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/item/entity.js b/module/item/entity.js index 37784699..925f391e 100644 --- a/module/item/entity.js +++ b/module/item/entity.js @@ -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);