|
|
|
|
66
|
}
|
66
|
}
|
67
|
|
67
|
|
68
|
requestPermission(permission, type) {
|
68
|
requestPermission(permission, type) {
|
69
|
- let options;
|
|
|
70
|
-
|
|
|
71
|
- if (!this.getPermissionTypes().includes(permission)) {
|
|
|
|
|
69
|
+ let options;
|
|
|
70
|
+
|
|
|
71
|
+ if (this.getPermissionTypes().indexOf(permission) === -1) {
|
72
|
return Promise.reject(`ReactNativePermissions: ${permission} is not a valid permission type on ${Platform.OS}`)
|
72
|
return Promise.reject(`ReactNativePermissions: ${permission} is not a valid permission type on ${Platform.OS}`)
|
73
|
} else if (permission == 'backgroundRefresh'){
|
73
|
} else if (permission == 'backgroundRefresh'){
|
74
|
return Promise.reject('ReactNativePermissions: You cannot request backgroundRefresh')
|
74
|
return Promise.reject('ReactNativePermissions: You cannot request backgroundRefresh')
|