forked from Ivasoft/mattermost-mobile
MM-15428 Fix iOS when managed config is not set (#2768)
This commit is contained in:
committed by
Miguel Alatzar
parent
7859b85391
commit
dfd011aebc
@@ -8,6 +8,7 @@ const {BlurAppScreen, MattermostManaged} = NativeModules;
|
||||
const mattermostManagedEmitter = new NativeEventEmitter(MattermostManaged);
|
||||
|
||||
const listeners = [];
|
||||
const emptyObject = {};
|
||||
let cachedConfig = {};
|
||||
|
||||
export default {
|
||||
@@ -38,7 +39,7 @@ export default {
|
||||
blurAppScreen: BlurAppScreen.enabled,
|
||||
getConfig: async () => {
|
||||
try {
|
||||
cachedConfig = await MattermostManaged.getConfig();
|
||||
cachedConfig = await MattermostManaged.getConfig() || emptyObject;
|
||||
} catch (error) {
|
||||
// do nothing...
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user