Fix crash in conf/etc. with empty optional values
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -98,6 +98,9 @@ function ansiSgrFromCnetStyleColorCode(cc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renegadeToAnsi(s, client) {
|
function renegadeToAnsi(s, client) {
|
||||||
|
if (!s) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
if (-1 == s.indexOf('|')) {
|
if (-1 == s.indexOf('|')) {
|
||||||
return s; // no pipe codes present
|
return s; // no pipe codes present
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ const SIMPLE_ELITE_MAP = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function stylizeString(s, style) {
|
function stylizeString(s, style) {
|
||||||
|
if (!s) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
var len = s.length;
|
var len = s.length;
|
||||||
var c;
|
var c;
|
||||||
var i;
|
var i;
|
||||||
|
|||||||
@@ -153,7 +153,11 @@ TextView.prototype.setText = function (text, redraw) {
|
|||||||
|
|
||||||
if (!_.isString(text)) {
|
if (!_.isString(text)) {
|
||||||
// allow |text| to be numbers/etc.
|
// allow |text| to be numbers/etc.
|
||||||
text = text.toString();
|
if (_.isUndefined(text) || null === text) {
|
||||||
|
text = '';
|
||||||
|
} else {
|
||||||
|
text = text.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const formatObj = getPredefinedMCIFormatObject(this.client, text);
|
const formatObj = getPredefinedMCIFormatObject(this.client, text);
|
||||||
|
|||||||
Reference in New Issue
Block a user