From 612ede2fca649a757ab8a572bcebc575930dc02a Mon Sep 17 00:00:00 2001 From: The Last Scrub Date: Sat, 28 Nov 2020 23:18:08 -0800 Subject: [PATCH] added check to NaN for skill modifier dialogue --- module/roll/roll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/roll/roll.js b/module/roll/roll.js index c51c0a5..cf33c90 100644 --- a/module/roll/roll.js +++ b/module/roll/roll.js @@ -215,7 +215,7 @@ export function sendPercentileTestToChat(actor, skill, target){ let targetModifier = html.find("[name='targetModifier']").val(); // this is text as a heads up let newTarget = parseInt(originalTarget); // this should be an int, but technically the incoming value is text, so parse it just to be safe - if(targetModifier.trim() != ""){ + if(targetModifier.trim() != "" && !isNaN(targetModifier)){ newTarget += parseInt(targetModifier); }