Don't use 'undefined' as boolean

Make sure we pass a proper false value instead of undefined to
avoid warnings.

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 358133e82f
commit e2f88d67f7
2 changed files with 3 additions and 3 deletions

View File

@ -391,10 +391,10 @@ const FdoNotificationDaemon = new Lang.Class({
notification.setUrgency(MessageTray.Urgency.CRITICAL);
break;
}
notification.setResident(hints.resident == true);
notification.setResident(!!hints.resident);
// 'transient' is a reserved keyword in JS, so we have to retrieve the value
// of the 'transient' hint with hints['transient'] rather than hints.transient
notification.setTransient(hints['transient'] == true);
notification.setTransient(!!hints['transient']);
let sourceGIcon = source.useNotificationIcon ? gicon : null;
source.processNotification(notification, sourceGIcon);