Hi, I have one Math.floor that is crashing when the watchface is downloaded from store but works as expected when side loading to device or simulator. The value i'm rounding is declared as Double and i'm checking for null and provide a default value, still crashing. The value comes from the properties. I even displayed the value in a text and i can see it on the screen while it's freezed before it crashes.
ERA says: Error Name: Invalid Value
From tests only with null i could get this error. Does anyone have a clue what might be wrong?
function recalculate(dc, a as Double, b as Double) {
if (a == null) {
a = 9.0;
}
var s = a+","+b;
dc.setColor(Gfx.COLOR_DK_GREEN, Gfx.COLOR_TRANSPARENT);
dc.drawText(120, 120, Gfx.FONT_TINY, s, Gfx.TEXT_JUSTIFY_CENTER);
var h1 = Math.floor(a);