mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
fix(files) getConfig: remove Promise before resolve
This commit is contained in:
parent
a4d292a988
commit
91b73dafce
1 changed files with 6 additions and 2 deletions
|
|
@ -115,20 +115,24 @@
|
|||
}
|
||||
|
||||
function getConfig(callback) {
|
||||
var RESTful = DOM.RESTful;
|
||||
var is,
|
||||
RESTful = DOM.RESTful;
|
||||
|
||||
if (!Promises.config)
|
||||
Promises.config = new Promise(function(resolve) {
|
||||
is = true;
|
||||
RESTful.Config.read(resolve);
|
||||
});
|
||||
|
||||
Promises.config.then(function(data) {
|
||||
is = false;
|
||||
Storage.setAllowed(data.localStorage);
|
||||
|
||||
callback(null, data);
|
||||
|
||||
timeout(function() {
|
||||
Promises.config = null;
|
||||
if (!is)
|
||||
Promises.config = null;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue