mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Fix array merging in the device service.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user