Fix device sometimes showing up twice on the list if coming back from the device page while releasing the device. Caused by websocket telling us about the release before we got the device data.

This commit is contained in:
Simo Kinnunen
2014-06-28 18:17:34 +09:00
parent 3496013212
commit 06573f7f6f

View File

@@ -145,9 +145,7 @@ module.exports = function DeviceServiceFactory($http, socket, EnhanceDeviceServi
scopedSocket.on('device.change', changeListener)
this.add = function(device) {
remove(device)
insert(device)
notify({
addListener({
important: true
, data: device
})