network: fix iterating connections in NMConnectionSection

Must compare the length of the array, not the array itself.

https://bugzilla.gnome.org/show_bug.cgi?id=706262
This commit is contained in:
Giovanni Campagna 2013-08-18 19:52:12 +02:00
parent 4a3f020cd9
commit 1b03e55cc3

View File

@ -187,7 +187,7 @@ const NMConnectionSection = new Lang.Class({
_getStatus: function() {
let values = this._connectionItems.values();
for (let i = 0; i < values; i++) {
for (let i = 0; i < values.length; i++) {
let item = values[i];
if (item.isActive())
return item.getName();