Skip to content

Commit f2f387b

Browse files
committed
fix checkMultiple handling of permissions with type on iOS
1 parent 34e035a commit f2f387b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.ios.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class ReactNativePermissions {
3939
if (!RNPTypes.includes(permission)) {
4040
return Promise.reject(`ReactNativePermissions: ${permission} is not a valid permission type on iOS`);
4141
}
42+
43+
type = type || DEFAULTS[permission]
4244

4345
return RNPermissions.getPermissionStatus(permission, type);
4446
}
@@ -58,7 +60,7 @@ class ReactNativePermissions {
5860
}
5961

6062
checkMultiple(permissions) {
61-
return Promise.all(permissions.map(this.check.bind(this)))
63+
return Promise.all(permissions.map(permission => this.check(permission)))
6264
.then(res => res.reduce((pre, cur, i) => {
6365
var name = permissions[i]
6466
pre[name] = cur

0 commit comments

Comments
 (0)