Browse Source

check permission in the permissionTypes

Jonathan Stanton 8 years ago
parent
commit
9d50f167de
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      ReactNativePermissions.js

+ 1
- 1
ReactNativePermissions.js View File

58
 
58
 
59
 
59
 
60
 	getPermissionStatus(permission) {
60
 	getPermissionStatus(permission) {
61
-  	if (RNPTypes.indexOf(permission) >= 0) {
61
+  	if (this.getPermissionTypes().indexOf(permission) >= 0) {
62
 			return RNPermissions.getPermissionStatus(permission)
62
 			return RNPermissions.getPermissionStatus(permission)
63
 		} else {
63
 		} else {
64
 			return Promise.reject(`ReactNativePermissions: ${permission} is not a valid permission type on ${Platform.OS}`)
64
 			return Promise.reject(`ReactNativePermissions: ${permission} is not a valid permission type on ${Platform.OS}`)