Fix for null error on undefined values

This commit is contained in:
Ivan Mikheykin
2018-12-19 16:08:34 +03:00
parent 188d912653
commit e1abad408e
3 changed files with 13 additions and 3 deletions
+6 -1
View File
@@ -107,7 +107,12 @@ System.register(["lodash"], function (_export, _context) {
}
if (values.length == 1) {
return this.getMatchedThreshold(values[0]).color;
var threshold = this.getMatchedThreshold(values[0]);
if (!threshold || !threshold.color || threshold.color == "") {
return 'rgba(0,0,0,1)';
} else {
return threshold.color;
}
}
var isAllValuesNulls = true;
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -1
View File
@@ -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;