(converter) NPE fix

This commit is contained in:
Viktor Lofgren 2023-07-12 20:13:01 +02:00
parent 8a53e107fa
commit bf783dad7a

View File

@ -24,7 +24,7 @@ public record ProcessHeartbeat(
return "STOPPED".equals(status); return "STOPPED".equals(status);
} }
public String progressStyle() { public String progressStyle() {
if ("RUNNING".equals(status) && progress > 0) { if ("RUNNING".equals(status) && progress != null) {
return """ return """
background: linear-gradient(90deg, #fff 0%%, #ccc %d%%, #fff %d%%) background: linear-gradient(90deg, #fff 0%%, #ccc %d%%, #fff %d%%)
""".formatted(progress, progress, progress); """.formatted(progress, progress, progress);