From 9becb3985d1245b3b75471cfae3b5d8b5c3102a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 10 Mar 2015 23:55:30 +0100 Subject: [PATCH] calendar: Guard against null passed to setBody() --- js/ui/calendar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 19d154ad2..cb63d6aae 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -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) {