1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 20:10:11 +03:00

use deep copy for all members

This commit is contained in:
cTn 2014-10-12 16:55:49 +02:00
parent a67bbac54b
commit f30d886f79

View file

@ -52,10 +52,10 @@ function configuration_backup(callback) {
query();
} else {
configuration.profiles.push({
'PID': jQuery.merge([], PIDs),
'PID': jQuery.extend(true, [], PIDs),
'RC': jQuery.extend(true, {}, RC_tuning),
'AccTrim': jQuery.merge([], CONFIG.accelerometerTrims),
'ServoConfig': jQuery.merge([], SERVO_CONFIG)
'AccTrim': jQuery.extend(true, [], CONFIG.accelerometerTrims),
'ServoConfig': jQuery.extend(true, [], SERVO_CONFIG)
});
codeKey = 0;
@ -83,10 +83,10 @@ function configuration_backup(callback) {
query();
});
} else {
configuration.AUX = AUX_CONFIG_values;
configuration.MISC = MISC;
configuration.RCMAP = RC_MAP;
configuration.BF_CONFIG = BF_CONFIG;
configuration.AUX = jQuery.extend(true, [], AUX_CONFIG_values);
configuration.MISC = jQuery.extend(true, {}, MISC);
configuration.RCMAP = jQuery.extend(true, [], RC_MAP);
configuration.BF_CONFIG = jQuery.extend(true, {}, BF_CONFIG);
save();
}