in mathjs node.eval is deprecated, replaced with .evaluate
This commit is contained in:
@@ -24,7 +24,7 @@ export default function evaluateCalculation(string, memo){
|
|||||||
});
|
});
|
||||||
// Evaluate the expression to a number or return with substitutions
|
// Evaluate the expression to a number or return with substitutions
|
||||||
try {
|
try {
|
||||||
return substitutedCalc.eval();
|
return substitutedCalc.evaluate();
|
||||||
} catch (e){
|
} catch (e){
|
||||||
return substitutedCalc.toString();
|
return substitutedCalc.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user