Skip to content

Commit

Permalink
fix Results crash upon encountering a string var in a number type col…
Browse files Browse the repository at this point in the history
…umn (#5587)
  • Loading branch information
RensDofferhoff authored Jul 22, 2024
1 parent f9ff03c commit f51bebf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Desktop/html/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ function formatColumn(column, type, format, alignNumbers, combine, modelFootnote
log10 = true;
}

for (var rowNo = 0; rowNo < column.length; rowNo++) {
var cell = column[rowNo]
var content = cell.content

if (typeof(content) !== "number" || typeof(content) !== "Number") {
if (isNaN(parseFloat(content))) // isn't a number
continue
console.warn("You are delivering a result that should be a number as a string, We will do our best :(");
cell.content = content = parseFloat(content)
}
}

if (isFinite(sf)) {

var upperLimit = 1e6
Expand Down

0 comments on commit f51bebf

Please sign in to comment.