When another plugin(or user code) requests a permission - the activityRequestPermissionsEvent event is fired. However, because the permission was not requested by the nativescript-permissions plugin there is no track of the request inside the pendingPromises.
This code change prevents the the Cannot call property "granted" of undefined" in that case.
When another plugin(or user code) requests a permission - the
activityRequestPermissionsEvent
event is fired. However, because the permission was not requested by thenativescript-permissions
plugin there is no track of the request inside thependingPromises
. This code change prevents the theCannot call property "granted" of undefined" in that case
.