diff --git a/lib/client/edit.js b/lib/client/edit.js index 6d82316a..e4951dca 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -156,6 +156,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch; Util.ifExec(!isDiff, function(patch) { var query, + isAllowed = DOM.Storage.isAllowed(), isString = Util.isString(patch), lessLength = patch.length < lValue.length; @@ -166,13 +167,18 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch; query = '?patch'; } - DOM.checkStorageHash(lPath, function(error, equal) { - if (!error) { - if (!equal) - query = ''; - + + Util.ifExec(!isAllowed, function() { DOM.RESTful.save(lPath, lValue, onSave, query); - } + }, function(callback) { + DOM.checkStorageHash(lPath, function(error, equal) { + if (!error) { + if (!equal) + query = ''; + + callback(); + } + }); }); }, function(callback) {