MM-15428 Fix iOS when managed config is not set (#2768)
This commit is contained in:
parent
7859b85391
commit
dfd011aebc
1 changed files with 2 additions and 1 deletions
|
|
@ -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...
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue