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:
parent
54891a4cd0
commit
091fb4ba2e
@ -570,7 +570,7 @@ const Keyboard = new Lang.Class({
|
|||||||
shouldTakeEvent: function(event) {
|
shouldTakeEvent: function(event) {
|
||||||
let actor = event.get_source();
|
let actor = event.get_source();
|
||||||
return Main.layoutManager.keyboardBox.contains(actor) ||
|
return Main.layoutManager.keyboardBox.contains(actor) ||
|
||||||
actor._extended_keys || actor.extended_key;
|
!!actor._extended_keys || !!actor.extended_key;
|
||||||
},
|
},
|
||||||
|
|
||||||
_clearKeyboardRestTimer: function() {
|
_clearKeyboardRestTimer: function() {
|
||||||
|
@ -391,10 +391,10 @@ const FdoNotificationDaemon = new Lang.Class({
|
|||||||
notification.setUrgency(MessageTray.Urgency.CRITICAL);
|
notification.setUrgency(MessageTray.Urgency.CRITICAL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
notification.setResident(hints.resident == true);
|
notification.setResident(!!hints.resident);
|
||||||
// 'transient' is a reserved keyword in JS, so we have to retrieve the value
|
// '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
|
// 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;
|
let sourceGIcon = source.useNotificationIcon ? gicon : null;
|
||||||
source.processNotification(notification, sourceGIcon);
|
source.processNotification(notification, sourceGIcon);
|
||||||
|
Loading…
Reference in New Issue
Block a user