[gnome-shell/wip/fmuellner/fix-notification-warning] notificationDaemon: Fix warning



commit f6aee7e8ab8d6c237261719812492c53db5e5e59
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Nov 23 17:57:59 2018 +0100

    notificationDaemon: Fix warning
    
    Since commit 33b8537bf5, we unconditionally access the 'image-path'
    hint, resulting in a gjs warning if the hint is not defined.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/309

 js/ui/notificationDaemon.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index b897b8a71..6ca7da307 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -78,7 +78,7 @@ var FdoNotificationDaemon = new Lang.Class({
             return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
                                                       bitsPerSample, width, height, rowStride);
         }
-        return this._iconForNotificationData(hints['image-path']);
+        return this._iconForNotificationData(hints['image-path'] || null);
     },
 
     _fallbackIconForNotificationData(hints) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]