fix(dom) getCurrentData: when could not get hash call callback with error

This commit is contained in:
coderaiser 2015-08-21 05:15:29 -04:00
parent 1f3f582217
commit ae547ccd23

View file

@ -758,13 +758,15 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
RESTful.read(path, func);
} else {
DOM.checkStorageHash(path, function(error, equal, hashNew) {
Util.exec.if(!error && equal, function() {
DOM.getDataFromStorage(path, callback);
}, function() {
hash = hashNew;
RESTful.read(path, func);
});
});
if (error) {
callback(error);
} else if (equal) {
DOM.getDataFromStorage(path, callback);
} else {
hash = hashNew;
RESTful.read(path, func);
}
});
}
};