mirror of
https://github.com/openstf/stf
synced 2025-10-05 19:42:01 +02:00
Fix array merging in the device service.
This commit is contained in:
parent
98ecf57d49
commit
13e3fe6624
1 changed files with 4 additions and 1 deletions
|
@ -74,7 +74,10 @@ module.exports = function DeviceServiceFactory($http, socket) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function modify(data, newData) {
|
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)
|
sync(data)
|
||||||
notify()
|
notify()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue