Fix: configService.set() pollutes default config

This commit is contained in:
Kosta Korenkov 2015-12-17 16:26:04 +03:00
commit 051d4c0f74

View file

@ -87,7 +87,7 @@ angular.module('copayApp.services').factory('configService', function(storageSer
};
root.set = function(newOpts, cb) {
var config = defaultConfig;
var config = lodash.clone(defaultConfig);
storageService.getConfig(function(err, oldOpts) {
if (lodash.isString(oldOpts)) {
oldOpts = JSON.parse(oldOpts);