diff --git a/diode/webclient/sdfg_utils.js b/diode/webclient/sdfg_utils.js index a968950c26..129184f0aa 100644 --- a/diode/webclient/sdfg_utils.js +++ b/diode/webclient/sdfg_utils.js @@ -72,13 +72,13 @@ function sdfg_range_elem_to_string(range, settings=null) { } else { let endp1 = sdfg_property_to_string(range.end, settings) + ' + 1'; // Try to simplify using math.js - var mathjs = null; + var mathjs = undefined; try { mathjs = window.math; } catch(e) { try { mathjs = math; } catch(e) {} } - if (mathjs !== null) + if (mathjs !== undefined) endp1 = mathjs.simplify(endp1).toString(); preview += sdfg_property_to_string(range.start, settings) + ':' +