calendar: Guard against null passed to setBody()

This commit is contained in:
Florian Müllner 2015-03-10 23:55:30 +01:00
parent 4cb7df67b7
commit 9becb3985d

View File

@ -1044,7 +1044,8 @@ const Message = new Lang.Class({
setBody: function(text) {
this._bodyText = text;
this.bodyLabel.setMarkup(text.replace(/\n/g, ' '), this._useBodyMarkup);
this.bodyLabel.setMarkup(text ? text.replace(/\n/g, ' ') : '',
this._useBodyMarkup);
},
setUseBodyMarkup: function(enable) {