From a47635c6752626cf072ee4d4b04fdf4972283347 Mon Sep 17 00:00:00 2001 From: William Petit Date: Thu, 3 Mar 2016 11:05:43 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20sauvegarde=20de=20profil=20modifi?= =?UTF-8?q?=C3=A9=20via=20=C3=A9diteur,=20fixes=20#2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/actions/edit.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/store/actions/edit.js b/src/store/actions/edit.js index daadaed..ace1dc1 100644 --- a/src/store/actions/edit.js +++ b/src/store/actions/edit.js @@ -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 }); }) ;