mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Android: Fix crash on opening settings on old versions of Android (#10793)
This commit is contained in:
parent
39ad1e23a8
commit
60e347a782
@ -7,10 +7,11 @@ import { _ } from '@joplin/lib/locale';
|
||||
|
||||
const getWebViewVersionText = () => {
|
||||
if (Platform.OS === 'android') {
|
||||
const constants = NativeModules.SystemVersionInformationModule.getConstants();
|
||||
// SystemVersionInformationModule is unavailable on older versions of Android.
|
||||
const constants = NativeModules.SystemVersionInformationModule?.getConstants();
|
||||
return [
|
||||
_('WebView version: %s', constants.webViewVersion),
|
||||
_('WebView package: %s', constants.webViewPackage),
|
||||
_('WebView version: %s', constants?.webViewVersion ?? _('Unknown')),
|
||||
_('WebView package: %s', constants?.webViewPackage ?? _('Unknown')),
|
||||
].join('\n');
|
||||
}
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user