refactor(files) getConfig: no need to save promise every time

This commit is contained in:
coderaiser 2015-04-15 02:50:43 -04:00
parent 8ce4d0621e
commit 8d43463215

View file

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