mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
fix(files) config read only once and do not sync with server even when server reloads
This commit is contained in:
parent
efc0479d25
commit
8ce4d0621e
1 changed files with 5 additions and 8 deletions
|
|
@ -140,16 +140,13 @@
|
|||
function getConfig(callback) {
|
||||
var RESTful = DOM.RESTful;
|
||||
|
||||
if (!Promises.config)
|
||||
Promises.config = new Promise(function(resolve) {
|
||||
RESTful.Config.read(resolve);
|
||||
});
|
||||
Promises.config = new Promise(function(resolve) {
|
||||
RESTful.Config.read(resolve);
|
||||
});
|
||||
|
||||
Promises.config.then(function(data) {
|
||||
if (!Data.config) {
|
||||
Data.config = data;
|
||||
Storage.setAllowed(data.localStorage);
|
||||
}
|
||||
Data.config = data;
|
||||
setConfig(data);
|
||||
|
||||
callback(null, data);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue