[gnome-shell] notificationDaemon: Avoid access to undefined property
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] notificationDaemon: Avoid access to undefined property
- Date: Thu, 13 Jul 2017 15:26:44 +0000 (UTC)
commit d815c5dfc04a1fe400a32c29eada880d3d6f8568
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jun 13 06:49:07 2017 +0200
notificationDaemon: Avoid access to undefined property
Avoid a warning when assigning from an undefined property by making
sure to pass a proper null value instead.
https://bugzilla.gnome.org/show_bug.cgi?id=781471
js/ui/notificationDaemon.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index 315bfdb..c8cba60 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -186,7 +186,8 @@ const FdoNotificationDaemon = new Lang.Class({
return source;
}
- source = new FdoNotificationDaemonSource(title, pid, sender, ndata ? ndata.hints['desktop-entry'] :
null);
+ let appId = ndata ? ndata.hints['desktop-entry'] || null : null;
+ source = new FdoNotificationDaemonSource(title, pid, sender, appId);
this._sources.push(source);
source.connect('destroy', Lang.bind(this, function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]