in mathjs node.eval is deprecated, replaced with .evaluate

This commit is contained in:
Thaum Rystra
2020-04-26 10:28:23 +02:00
parent 6746f5f989
commit 88ed912d18

View File

@@ -24,7 +24,7 @@ export default function evaluateCalculation(string, memo){
});
// Evaluate the expression to a number or return with substitutions
try {
return substitutedCalc.eval();
return substitutedCalc.evaluate();
} catch (e){
return substitutedCalc.toString();
}