Skip to content

Commit

Permalink
FLUID-5770: Improved comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
cindyli committed Sep 22, 2015
1 parent 076bf25 commit d477dfb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/framework/preferences/js/PrefsEditor.js
Expand Up @@ -372,7 +372,7 @@ var fluid_2_0 = fluid_2_0 || {};

/**
* Sends the prefsEditor.model to the store and fires onSave
* @param that: An fluid.prefs.prefsEditor instance
* @param that: A fluid.prefs.prefsEditor instance
* @return the saved model
*/
fluid.prefs.prefsEditor.save = function (that) {
Expand All @@ -385,8 +385,7 @@ var fluid_2_0 = fluid_2_0 || {};
stats = {changes: 0, unchanged: 0, changeMap: {}},
changedPrefs = {};

// Only save the changed preferences so the future initial model value change on unchanged
// preferences can still be correctly merged with changed preferences
// To address https://issues.fluidproject.org/browse/FLUID-4686
fluid.model.diff(modelToSave.preferences, fluid.get(initialModel, ["preferences"]), stats);

if (stats.changes === 0) {
Expand Down

0 comments on commit d477dfb

Please sign in to comment.