mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
chore(client) ajaxLoad: add early return
This commit is contained in:
parent
74d12c4303
commit
f603de9030
1 changed files with 14 additions and 13 deletions
|
|
@ -404,21 +404,22 @@ var Util, DOM, CloudFunc, join;
|
|||
noCurrent = options.noCurrent;
|
||||
|
||||
if (!isRefresh && json)
|
||||
createFileTable(obj, panel, options, callback);
|
||||
else
|
||||
RESTful.read(path, 'json', function(error, obj) {
|
||||
if (!error) {
|
||||
Storage.set(path, obj);
|
||||
|
||||
createFileTable(obj, panel, options, function() {
|
||||
if (isRefresh && !noCurrent) {
|
||||
DOM.setCurrentByName(name);
|
||||
}
|
||||
|
||||
Util.exec(callback);
|
||||
});
|
||||
return createFileTable(obj, panel, options, callback);
|
||||
|
||||
RESTful.read(path, 'json', function(error, obj) {
|
||||
if (error)
|
||||
return;
|
||||
|
||||
Storage.set(path, obj);
|
||||
|
||||
createFileTable(obj, panel, options, function() {
|
||||
if (isRefresh && !noCurrent) {
|
||||
DOM.setCurrentByName(name);
|
||||
}
|
||||
|
||||
Util.exec(callback);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
if (!options)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue