18
0
Fork 0

Correction sauvegarde de profil modifié via éditeur, fixes #2

Dieser Commit ist enthalten in:
wpetit 2016-03-03 11:05:43 +01:00
Ursprung 4d2891f9b6
Commit a47635c675
1 geänderte Dateien mit 2 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -62,19 +62,13 @@ exports.saveProfile = function(destPath, profile) {
logger.info('Saving profile to "%s"...', destPath);
var cleanedProfile = _.cloneDeep(profile);
Util.Tree.walk(cleanedProfile, function(item) {
delete item.selected;
delete item._key;
});
return Util.System.saveJSON(destPath, cleanedProfile)
return Util.System.saveJSON(destPath, profile)
.then(function() {
dispatch({ type: SAVE_PROFILE_SUCCESS, profile: profile, path: destPath });
logger.info('Profile saved.');
})
.catch(function(err) {
logger.error(err);
dispatch({ type: SAVE_PROFILE_FAILED, error: err });
})
;