Ver Fonte

Better comment

bienur há 8 anos atrás
pai
commit
ef3b88de16
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      index.android.js

+ 2 - 1
index.android.js

@@ -70,7 +70,8 @@ class ReactNativePermissions {
 
 		return RNPermissions.request(androidPermission)
 			.then(res => {
-				// For OS versions prior to Android M, request to native module resolve to boolean
+				// RNPermissions.request() to native module resolves to boolean
+				// rather than string if running on OS version prior to Android M 
 				if (typeof res === 'boolean') return res ? 'authorized' : 'denied';
 				return setDidAskOnce(permission)
 					.then(() => RESULTS[res])