Browse Source

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

William Petit 3 years ago
parent
commit
a47635c675
1 changed files with 2 additions and 8 deletions
  1. 2
    8
      src/store/actions/edit.js

+ 2
- 8
src/store/actions/edit.js View File

@@ -62,19 +62,13 @@ exports.saveProfile = function(destPath, profile) {
62 62
 
63 63
     logger.info('Saving profile to "%s"...', destPath);
64 64
 
65
-    var cleanedProfile = _.cloneDeep(profile);
66
-
67
-    Util.Tree.walk(cleanedProfile, function(item) {
68
-      delete item.selected;
69
-      delete item._key;
70
-    });
71
-
72
-    return Util.System.saveJSON(destPath, cleanedProfile)
65
+    return Util.System.saveJSON(destPath, profile)
73 66
       .then(function() {
74 67
         dispatch({ type: SAVE_PROFILE_SUCCESS, profile: profile, path: destPath });
75 68
         logger.info('Profile saved.');
76 69
       })
77 70
       .catch(function(err) {
71
+        logger.error(err);
78 72
         dispatch({ type: SAVE_PROFILE_FAILED, error: err });
79 73
       })
80 74
     ;