1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

Fix array merging in the device service.

This commit is contained in:
Simo Kinnunen 2014-05-01 20:23:39 +09:00
parent 98ecf57d49
commit 13e3fe6624

View file

@ -74,7 +74,10 @@ module.exports = function DeviceServiceFactory($http, socket) {
}
function modify(data, newData) {
_.merge(data, newData)
_.merge(data, newData, function(a, b) {
// New Arrays overwrite old Arrays
return _.isArray(b) ? b : undefined
})
sync(data)
notify()
}