[gnome-shell] calendar: Guard against null passed to setBody()
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] calendar: Guard against null passed to setBody()
- Date: Tue, 10 Mar 2015 22:57:11 +0000 (UTC)
commit 9becb3985d1245b3b75471cfae3b5d8b5c3102a7
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Mar 10 23:55:30 2015 +0100
calendar: Guard against null passed to setBody()
js/ui/calendar.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 19d154a..cb63d6a 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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]