Skip to content

Commit

Permalink
Update mathWorker.js
Browse files Browse the repository at this point in the history
Fixed issue with comments after ";"
  • Loading branch information
dvd101x authored May 23, 2024
1 parent 2e0871e commit 036d291
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions public/mathWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ function formatResult(result) {
function processExpression(expression) {
// returns an object with isError and result properties
const result = calc(expression.source)
const visible = expression.source.trim().endsWith(';') ? false :
result.value === undefined ? false : true
const visible = (result && result.value !== undefined && result.value.isResultSet && result.value.entries.length == 0) ? false : true

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

0 comments on commit 036d291

Please sign in to comment.