You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Android: Fix crash on opening settings on old versions of Android (#10793)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user