[gnome-shell] network: Make sure not to checkConnection on the wireless section



commit f74567fbab7d0aa1b35237eadef49bdef33103d5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Aug 7 06:44:38 2013 -0400

    network: Make sure not to checkConnection on the wireless section
    
    As the wireless section does not contain checkConnection.

 js/ui/status/network.js |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index fc0f47b..7517118 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1571,9 +1571,10 @@ const NMApplet = new Lang.Class({
             this._vpnSection.checkConnection(connection);
         } else {
             let devices = this._devices[section].devices;
-            for (let i = 0; i < devices.length; i++) {
-                devices[i].checkConnection(connection);
-            }
+            devices.forEach(function(wrapper) {
+                if (wrapper instanceof NMConnectionSection)
+                    wrapper.checkConnection(connection);
+            });
         }
     },
 


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