mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
chore(dom) getCurrentData: add early return
This commit is contained in:
parent
18ee400d6f
commit
d6616c8b76
1 changed files with 15 additions and 15 deletions
|
|
@ -739,24 +739,24 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
|
||||
if (Info.name === '..') {
|
||||
Dialog.alert.noFiles(TITLE);
|
||||
callback(Error('No files selected!'));
|
||||
} else if (isDir) {
|
||||
RESTful.read(path, func);
|
||||
} else {
|
||||
DOM.checkStorageHash(path, function(error, equal, hashNew) {
|
||||
if (error) {
|
||||
callback(error);
|
||||
} else if (equal) {
|
||||
DOM.getDataFromStorage(path, callback);
|
||||
} else {
|
||||
hash = hashNew;
|
||||
RESTful.read(path, func);
|
||||
}
|
||||
});
|
||||
return callback(Error('No files selected!'));
|
||||
}
|
||||
|
||||
if (isDir)
|
||||
return RESTful.read(path, func);
|
||||
|
||||
DOM.checkStorageHash(path, function(error, equal, hashNew) {
|
||||
if (error) {
|
||||
callback(error);
|
||||
} else if (equal) {
|
||||
DOM.getDataFromStorage(path, callback);
|
||||
} else {
|
||||
hash = hashNew;
|
||||
RESTful.read(path, func);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* unified way to save current file content
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue