forked from GitHub-Mirrors/foundry-sw5e
Fix ammo being consumed if the roll config dialog is canceled
This commit is contained in:
parent
1087324154
commit
46a831e840
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue