瀏覽代碼

Better comment

bienur 7 年之前
父節點
當前提交
ef3b88de16
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      index.android.js

+ 2
- 1
index.android.js 查看文件

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