Skip to content

Commit 9251686

Browse files
committed
Gracefully handle invalid numbers
1 parent 26e57f7 commit 9251686

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Griddly/Scripts/griddly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@
523523
//else if (dataType == "Percent")
524524
// val += "%";
525525

526-
if (val.indexOf(".00", val.length - 3) !== -1)
526+
if (val && val.indexOf(".00", val.length - 3) !== -1)
527527
val = val.substr(0, val.length - 3);
528528

529529
return val;

0 commit comments

Comments
 (0)