mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
fix(dom) getCurrentData: when could not get hash call callback with error
This commit is contained in:
parent
1f3f582217
commit
ae547ccd23
1 changed files with 9 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue