chore(client) ajaxLoad: add early return

This commit is contained in:
coderaiser 2017-01-23 17:29:37 +02:00
parent 74d12c4303
commit f603de9030

View file

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