Skip to content

Commit

Permalink
fixed issue with comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dvd101x authored Jun 10, 2024
1 parent 294f57c commit be73e93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public/mathWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ function formatResult(result) {
function processExpression(expression) {
// returns an object with isError and result properties
const result = calc(expression.source)
const visible = (result && result.value !== undefined && result.value.isResultSet && result.value.entries.length == 0) ? false : true
const visible = (result && result.value && result.value.isResultSet && (result.value.entries.length == 0)) ? false :
(result.value === undefined) ? false : true

if (result.isError) {
return { type: "error", result: result.value, visible }
Expand Down

0 comments on commit be73e93

Please sign in to comment.