mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-11 08:04:23 +08:00
Clean up getConfiguration to be more readible
This commit is contained in:
@@ -20,12 +20,15 @@ function setUpTestDependencies(testSdk, testConfiguration, testNativeBridge){
|
||||
}
|
||||
|
||||
function getConfiguration() {
|
||||
return Promise
|
||||
.resolve(config || NativeCodePush.getConfiguration())
|
||||
.then((configuration) => {
|
||||
if (!config) config = configuration;
|
||||
return config;
|
||||
});
|
||||
if (config) {
|
||||
return Promise.resolve(config);
|
||||
} else {
|
||||
return NativeCodePush.getConfiguration()
|
||||
.then((configuration) => {
|
||||
if (!config) config = configuration;
|
||||
return config;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getSdk() {
|
||||
|
||||
Reference in New Issue
Block a user