Skip to content

Commit

Permalink
fix(roll): ensure comparator is checked before processing dollarValue
Browse files Browse the repository at this point in the history
- It wont remove the text if there is no comparator
- Keep original name in case of
  • Loading branch information
Mara-Li committed Dec 15, 2024
1 parent 59e3c5e commit 5a64c7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bot/src/utils/roll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export async function rollDice(
comparator = comparatorMatch[0];
}

if (dollarValue) {
if (dollarValue && comparator.length > 0) {
const originalName = infoRoll.name;
if (dollarValue.diceResult)
infoRoll.name = replaceStatInDice(
Expand Down

0 comments on commit 5a64c7d

Please sign in to comment.