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
This commit is contained in:
Florian Müllner 2017-06-13 06:49:07 +02:00
parent 384ef7e100
commit cd678d86e8

View File

@ -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() {