Fix app crashes on iOS 9.3 (#2005)
This commit is contained in:
parent
e44af0c26e
commit
e1a62ee0de
1 changed files with 9 additions and 1 deletions
10
app/app.js
10
app/app.js
|
|
@ -2,7 +2,7 @@
|
|||
// See LICENSE.txt for license information.
|
||||
|
||||
/* eslint-disable global-require*/
|
||||
import {AsyncStorage, Linking, NativeModules} from 'react-native';
|
||||
import {AsyncStorage, Linking, NativeModules, Platform} from 'react-native';
|
||||
import {setGenericPassword, getGenericPassword, resetGenericPassword} from 'react-native-keychain';
|
||||
|
||||
import {loadMe} from 'mattermost-redux/actions/users';
|
||||
|
|
@ -51,6 +51,14 @@ export default class App {
|
|||
this.token = null;
|
||||
this.url = null;
|
||||
|
||||
// Load polyfill for iOS 9
|
||||
if (Platform.OS === 'ios') {
|
||||
const majorVersionIOS = parseInt(Platform.Version, 10);
|
||||
if (majorVersionIOS < 10) {
|
||||
require('babel-polyfill');
|
||||
}
|
||||
}
|
||||
|
||||
// Usage deeplinking
|
||||
Linking.addEventListener('url', this.handleDeepLink);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue