feature(edit) if storage disabled - hash not getted

This commit is contained in:
coderaiser 2013-11-29 08:58:48 +00:00
parent a344339bae
commit 98bcbdb7e8

View file

@ -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) {