Fix crash in conf/etc. with empty optional values

This commit is contained in:
Bryan Ashby
2023-12-23 18:09:32 -07:00
parent 6aa0c8679f
commit 223b7b2ed6
5 changed files with 12 additions and 1 deletions

View File

@@ -153,7 +153,11 @@ TextView.prototype.setText = function (text, redraw) {
if (!_.isString(text)) {
// 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);