diff --git a/lib/client/edit.js b/lib/client/edit.js index 3375bebe..8d216bf7 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -160,7 +160,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch; isAllowed = DOM.Storage.isAllowed(), isString = Util.isString(patch), lessLength = patch.length < lValue.length, - onSave = function(hash) { + getSave = function(hash) { return function(data) { onSave(data, hash); }; @@ -175,7 +175,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch; Util.ifExec(!isAllowed, function(loadHash) { - DOM.RESTful.save(lPath, lValue, onSave(loadHash), query); + DOM.RESTful.save(lPath, lValue, getSave(loadHash), query); }, function(callback) { DOM.checkStorageHash(lPath, function(error, equal, loadHash) { if (!error) {