Don't throw in canImplyAuthentication

This commit is contained in:
Joel Arvidsson 2018-02-25 17:07:18 +01:00
parent aac2d3d8c4
commit b227c59406
2 changed files with 2 additions and 2 deletions

View File

@ -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));
}

View File

@ -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') {