diff --git a/src/components/home/queryresults/value/Value.js b/src/components/home/queryresults/value/Value.js index 5786a14..897d65b 100644 --- a/src/components/home/queryresults/value/Value.js +++ b/src/components/home/queryresults/value/Value.js @@ -75,10 +75,8 @@ function Value(props) { if (pvSeverity !== undefined) { if (pvSeverity === "NONE") { textColor = colors.SEV_COLORS["OK"]; - } else if (pvSeverity in colors.SEV_COLORS) { - textColor = colors.SEV_COLORS[pvSeverity]; } else { - textColor = "#000" + textColor = pvSeverity in colors.SEV_COLORS ? colors.SEV_COLORS[pvSeverity] : "#000"; } } diff --git a/src/components/pv/valuetable/ValueTable.js b/src/components/pv/valuetable/ValueTable.js index 34b02dc..4f1f086 100644 --- a/src/components/pv/valuetable/ValueTable.js +++ b/src/components/pv/valuetable/ValueTable.js @@ -156,11 +156,7 @@ function ValueTable(props) { if (message.severity === "NONE") { setAlarmColor(colors.SEV_COLORS["OK"]); } else if (message.severity !== "") { - if (message.severity in colors.SEV_COLORS) { - setAlarmColor(colors.SEV_COLORS[message.severity]); - } else { - setAlarmColor("#000") - } + message.severity in colors.SEV_COLORS ? setAlarmColor(colors.SEV_COLORS[message.severity]) : setAlarmColor("#000"); } if (!props.snapshot) { setPVSeverity(message.severity);