From e0d2c43db08c6e3e3b336ca511fa25e392297acf Mon Sep 17 00:00:00 2001 From: The Happy Anarchist Date: Sat, 24 Oct 2020 17:09:39 -1000 Subject: [PATCH] Fix for form issue on sheet rolls --- src/module/dice.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/module/dice.js b/src/module/dice.js index f6c8cf7..a019e8b 100644 --- a/src/module/dice.js +++ b/src/module/dice.js @@ -331,7 +331,7 @@ export class AcksDice { }; let buttons = {} - if (skipDialog) { AcksDice.sendRoll(rollData); } + if (skipDialog) { return AcksDice.sendRoll(rollData); } if (game.settings.get("acks", "removeMagicBonus") == false) { buttons = { ok: { @@ -339,7 +339,7 @@ export class AcksDice { icon: '', callback: (html) => { rolled = true; - rollData.form = html[0].children[0]; + rollData.form = html[0].querySelector("form"); roll = AcksDice.sendRoll(rollData); }, }, @@ -348,7 +348,7 @@ export class AcksDice { icon: '', callback: (html) => { rolled = true; - rollData.form = html[0].children[0]; + rollData.form = html[0].querySelector("form"); rollData.data.roll.target = parseInt(rollData.data.roll.target) + parseInt(rollData.data.roll.magic); rollData.title += ` ${game.i18n.localize("ACKS.saves.magic.short")} (${rollData.data.roll.magic})`; roll = AcksDice.sendRoll(rollData); @@ -431,7 +431,7 @@ export class AcksDice { icon: '', callback: (html) => { rolled = true; - rollData.form = html[0].children[0]; + rollData.form = html[0].querySelector("form"); roll = ["melee", "missile", "attack"].includes(data.roll.type) ? AcksDice.sendAttackRoll(rollData) : AcksDice.sendRoll(rollData);