diff --git a/.eslintrc.js b/.eslintrc.js index aa02b15..9ff5b39 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -64,7 +64,7 @@ module.exports = { 'react/no-unescaped-entities': 'off', // react native plugin 'react-native/no-unused-styles': 'warn', - 'react-native/split-platform-components': 'warn', + 'react-native/split-platform-components': 'off', 'react-native/no-inline-styles': 'warn', 'react-native/no-color-literals': 'off', 'react-native/no-raw-text': 'off', diff --git a/example/src/Media.tsx b/example/src/Media.tsx index 1cc7173..5376315 100644 --- a/example/src/Media.tsx +++ b/example/src/Media.tsx @@ -20,6 +20,7 @@ const requestSavePermission = async (): Promise => { if (Platform.OS !== 'android') return true; const permission = PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE; + if (permission == null) return false; let hasPermission = await PermissionsAndroid.check(permission); if (!hasPermission) { const permissionRequestResult = await PermissionsAndroid.request(permission);