Explorar o código

gluon-status-page: fix neighbour purging

notUpdated is a Set, to a for-in loop doesn't work.

Fixes #657
Matthias Schiffer %!s(int64=8) %!d(string=hai) anos
pai
achega
79bc3a8d4b
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      package/gluon-status-page/src/js/lib/gui/neighbours.js

+ 2 - 2
package/gluon-status-page/src/js/lib/gui/neighbours.js

@@ -198,11 +198,11 @@ function (Helper, SignalGraph, Signal) {
         notUpdated.delete(id)
         notUpdated.delete(id)
       }
       }
 
 
-      for (id in notUpdated) {
+      notUpdated.forEach(function (id) {
         managedNeighbours[id].views.forEach( function (d) { d.destroy() })
         managedNeighbours[id].views.forEach( function (d) { d.destroy() })
         colors.push(managedNeighbours[id].color)
         colors.push(managedNeighbours[id].color)
         delete managedNeighbours[id]
         delete managedNeighbours[id]
-      }
+      })
     }
     }