[gnome-shell] status/network: Compare icon name to NULL instead of empty string



commit aac01f1c9e1d31cbbcd707aa003f9470b2130eb1
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Thu Nov 21 16:04:12 2019 +0700

    status/network: Compare icon name to NULL instead of empty string
    
    Since the last commit we set the gicon property of StIcon to NULL if an
    empty string was given when setting the icon name, this means
    `st_icon_get_icon_name()` will return NULL instead of an empty string.
    
    When `getIndicatorIcon()` returns an empty string, the icon_name
    property will now be set to NULL, so compare it to NULL here.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/888

 js/ui/status/network.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 2f9cd0e2b6..a8d2d08932 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -2069,6 +2069,6 @@ class Indicator extends PanelMenu.SystemIndicator {
         }
 
         this._vpnIndicator.icon_name = this._vpnSection.getIndicatorIcon();
-        this._vpnIndicator.visible = this._vpnIndicator.icon_name != '';
+        this._vpnIndicator.visible = this._vpnIndicator.icon_name !== null;
     }
 });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]