Fix: make a deep copy of temp profiles and terminal filters

Otherwise changes to the observable will write into the last received values,
making the changes undetectable.
This commit is contained in:
Gina Häußge 2015-10-02 10:18:30 +02:00
parent ac6cfbc0ea
commit 874ebde069

View file

@ -649,7 +649,10 @@ $(function() {
longRunningCommands: function(value) { self.serial_longRunningCommands(value.join(", "))},
checksumRequiringCommands: function(value) { self.serial_checksumRequiringCommands(value.join(", "))}
},
terminalFilters: function(value) { self.terminalFilters.removeAll(); _.each(value, function(item) {self.terminalFilters.push(item)}); }
terminalFilters: function(value) { self.terminalFilters($.extend(true, [], value)) },
temperature: {
profiles: function(value) { self.temperature_profiles($.extend(true, [], value)); }
}
};
var mapToObservables = function(data, mapping, local, keyPrefix) {