diff --git a/Boolean-Algebra/script.js b/Boolean-Algebra/script.js index 1af22fb..969379c 100644 --- a/Boolean-Algebra/script.js +++ b/Boolean-Algebra/script.js @@ -66,6 +66,7 @@ function Evaluate() { let formulaValuesRPNArray = ConvertCharsToValues(formulaRPNArray); let result = SolveRPNFormula(formulaValuesRPNArray); + if (result == undefined) return; let readableResult = ConvertToReadableResult(result); let resultField = document.getElementById('result'); @@ -272,6 +273,7 @@ function StepByStep() { let formulaValuesRPNArray = ConvertCharsToValues(formulaRPNArray); let result = SolveRPNFormula(formulaValuesRPNArray); + if (result == undefined) return; let readableResult = ConvertToReadableResult(result); let resultField = document.getElementById('result');