Don't throw in canImplyAuthentication
This commit is contained in:
parent
aac2d3d8c4
commit
b227c59406
|
@ -172,7 +172,7 @@ RCT_EXPORT_METHOD(canCheckAuthentication:(NSDictionary *)options resolver:(RCTPr
|
|||
BOOL canBeProtected = [self canCheckAuthentication:policyToEvaluate error:&aerr ];
|
||||
|
||||
if (aerr || !canBeProtected) {
|
||||
return rejectWithError(reject, aerr);
|
||||
return resolve(@(NO));
|
||||
} else {
|
||||
return resolve(@(YES));
|
||||
}
|
||||
|
|
2
index.js
2
index.js
|
@ -41,7 +41,7 @@ type SecureOptions = {
|
|||
* Inquire if the type of local authentication policy (LAPolicy) is supported
|
||||
* on this device with the device settings the user chose.
|
||||
* @param {object} options LAPolicy option, iOS only
|
||||
* @return {Promise} Resolves to `true` when successful
|
||||
* @return {Promise} Resolves to `true` when supported, otherwise `false`
|
||||
*/
|
||||
export function canImplyAuthentication(options?: SecureOptions): Promise {
|
||||
if (Platform.OS !== 'ios') {
|
||||
|
|
Loading…
Reference in New Issue