mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(files) getConfig: no need to save promise every time
This commit is contained in:
parent
8ce4d0621e
commit
8d43463215
1 changed files with 4 additions and 3 deletions
|
|
@ -138,13 +138,14 @@
|
|||
}
|
||||
|
||||
function getConfig(callback) {
|
||||
var RESTful = DOM.RESTful;
|
||||
var promise,
|
||||
RESTful = DOM.RESTful;
|
||||
|
||||
Promises.config = new Promise(function(resolve) {
|
||||
promise = new Promise(function(resolve) {
|
||||
RESTful.Config.read(resolve);
|
||||
});
|
||||
|
||||
Promises.config.then(function(data) {
|
||||
promise.then(function(data) {
|
||||
Data.config = data;
|
||||
setConfig(data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue