Fixed bug where rolls weren't recalculating in actions

This commit is contained in:
ThaumRystra
2025-01-20 19:59:57 +02:00
parent be47b90c32
commit 3315b5607a
4 changed files with 25 additions and 15 deletions

View File

@@ -41,12 +41,13 @@ const constant: ConstantFactory = {
},
}
export function isFiniteNode(node: ParseNode): node is FiniteNumberConstantNode {
export function isFiniteNode(node: ParseNode | undefined): node is FiniteNumberConstantNode {
return node
&& node.parseType === 'constant'
&& node.valueType === 'number'
&& typeof node.value === 'number'
&& isFinite(node.value);
&& isFinite(node.value)
|| false;
}
export default constant;