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
This commit is contained in:
Florian Müllner 2018-11-23 17:57:59 +01:00
parent 7c4e43c84f
commit e0a992af73

View File

@ -77,8 +77,10 @@ var FdoNotificationDaemon = new Lang.Class({
bitsPerSample, nChannels, data] = hints['image-data'];
return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
bitsPerSample, width, height, rowStride);
} else if (hints['image-path']) {
return this._iconForNotificationData(hints['image-path'];
}
return this._iconForNotificationData(hints['image-path']);
return null;
},
_fallbackIconForNotificationData(hints) {