Fixed crash when unit is null

This commit is contained in:
Mark van Renswoude 2024-11-22 06:45:51 +01:00
parent 02f2ddad58
commit 91f0d0eb31

View File

@ -89,7 +89,7 @@ class ComplicationSubscriber
case self.stepsComplicationId: case self.stepsComplicationId:
{ {
self.steps = complication.unit.equals("K") ? Math.floor(complicationValue * 1000) : complicationValue; self.steps = complication.unit != null && complication.unit.equals("K") ? Math.floor(complicationValue * 1000) : complicationValue;
break; break;
} }