diff --git a/js/ui/status/power.js b/js/ui/status/power.js index ea7654956..1669734a2 100644 --- a/js/ui/status/power.js +++ b/js/ui/status/power.js @@ -152,11 +152,12 @@ const Indicator = new Lang.Class({ _syncIcon: function() { let icon = this._proxy.Icon; - let hasIcon = (icon != null); + let hasIcon = false; - if (hasIcon) { + if (icon) { let gicon = Gio.icon_new_for_string(icon); this.setGIcon(gicon); + hasIcon = true; } this.mainIcon.visible = hasIcon; this.actor.visible = hasIcon && !this._isLocked;