|
@@ -43,12 +43,14 @@ class ReactNativePermissions {
|
43
|
43
|
}
|
44
|
44
|
|
45
|
45
|
request = (permission, options) => {
|
46
|
|
- let type = null;
|
|
46
|
+ let type = null
|
47
|
47
|
if (typeof options === 'string' || options instanceof Array) {
|
48
|
|
- console.warn('[react-native-permissions] : You are using a deprecated version of request(). You should use an object as second parameter. Please check the documentation for more information : https://github.com/yonahforst/react-native-permissions');
|
49
|
|
- type = options;
|
|
48
|
+ console.warn(
|
|
49
|
+ '[react-native-permissions] : You are using a deprecated version of request(). You should use an object as second parameter. Please check the documentation for more information : https://github.com/yonahforst/react-native-permissions',
|
|
50
|
+ )
|
|
51
|
+ type = options
|
50
|
52
|
} else if (options != null) {
|
51
|
|
- type = options.type;
|
|
53
|
+ type = options.type
|
52
|
54
|
}
|
53
|
55
|
|
54
|
56
|
if (!permissionTypes.includes(permission)) {
|
|
@@ -65,8 +67,6 @@ class ReactNativePermissions {
|
65
|
67
|
)
|
66
|
68
|
}
|
67
|
69
|
|
68
|
|
-
|
69
|
|
-
|
70
|
70
|
return PermissionsIOS.requestPermission(
|
71
|
71
|
permission,
|
72
|
72
|
type || DEFAULTS[permission],
|