Change if statement with conditional operator
This commit is contained in:
+1
-5
@@ -220,9 +220,5 @@ function getBleedingPredictionRange(prediction) {
|
||||
if (todayDate.isAfter(predictedBleedingEnd)) {
|
||||
return labels.unknown
|
||||
}
|
||||
if (daysToEnd === 0) {
|
||||
return '0'
|
||||
} else {
|
||||
return `0 - ${daysToEnd}`
|
||||
}
|
||||
return (daysToEnd === 0 ? '0' : `0 - ${daysToEnd}`)
|
||||
}
|
||||
Reference in New Issue
Block a user