NathanaelA / nativescript-permissions

Wraps up the entire Android 6 permissions system in a easy to use plugin.
MIT License
46 stars 22 forks source link

Android error if request more than once for permissions #16

Closed Daxito closed 8 years ago

Daxito commented 8 years ago

I have this app that tracks user location, so I deny permission the first time it asked me on screen X, then I went to some other screen Y and came back to screen X and it asked for permissions again but after selecting "Deny" this second time it throw an error on this line:

if (typeof promises.granted !== 'function') { return; }

Basically the error says that "promises" is undefined, so it cannot read "granted", does not matter if granted was there or not, promises is undefined...

Using NS 2.3.0 and plugin version 1.2.0

Thanks!

NathanaelA commented 8 years ago

Fixed in v1.2.1