Dice expression breakdown shows [object Object] instead of constants and operators
Issue #274
resolved
Setup
dnd5e: 1.4.1
obsidian: 5.0.8
Keeping this one short, the function compileExpression in js/module/rolls.js is returning NumericTerm and OperatorTerm terms instead of their values, causing them to be showns as “[object Object]”
Attached is a patch adds the following to the processing of terms in compileExpression:
if (part instanceof NumericTerm) {
return part.number;
}
if (part instanceof OperatorTerm) {
return part.operator;
}
Comments (2)
-
reporter -
repo owner - changed status to resolved
Thanks for the patch, Ben. Fixed in 5.0.9
- Log in to comment
Tested this by creating a feature with a dice expression such as “@abilities.int.mod+@abilities.cha.mod”