mirror of
https://github.com/timberjoegithub/grafana-statusmap.git
synced 2026-07-21 23:42:03 +00:00
Fix for null error on undefined values
This commit is contained in:
@@ -67,7 +67,12 @@ export class ColorModeDiscrete {
|
||||
}
|
||||
|
||||
if (values.length == 1) {
|
||||
return this.getMatchedThreshold(values[0]).color;
|
||||
let threshold = this.getMatchedThreshold(values[0]);
|
||||
if (!threshold || !threshold.color || threshold.color == "") {
|
||||
return 'rgba(0,0,0,1)';
|
||||
} else {
|
||||
return threshold.color;
|
||||
}
|
||||
}
|
||||
|
||||
let isAllValuesNulls = true;
|
||||
|
||||
Reference in New Issue
Block a user