1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-26 18:58:21 +02:00

Android: Fix crash on opening settings on old versions of Android (#10793)

This commit is contained in:
Henry Heino 2024-07-29 14:18:16 -07:00 committed by GitHub
parent 39ad1e23a8
commit 60e347a782
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,10 +7,11 @@ import { _ } from '@joplin/lib/locale';
const getWebViewVersionText = () => { const getWebViewVersionText = () => {
if (Platform.OS === 'android') { if (Platform.OS === 'android') {
const constants = NativeModules.SystemVersionInformationModule.getConstants(); // SystemVersionInformationModule is unavailable on older versions of Android.
const constants = NativeModules.SystemVersionInformationModule?.getConstants();
return [ return [
_('WebView version: %s', constants.webViewVersion), _('WebView version: %s', constants?.webViewVersion ?? _('Unknown')),
_('WebView package: %s', constants.webViewPackage), _('WebView package: %s', constants?.webViewPackage ?? _('Unknown')),
].join('\n'); ].join('\n');
} }
return null; return null;