Skip to content

Commit

Permalink
fix getting biometric
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Jul 8, 2018
1 parent 640be51 commit 476635a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/simulator-xcode-9.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,13 @@ class SimulatorXcode9 extends SimulatorXcode8 {

getBiometric (biometricName) {
const {BIOMETRICS} = SimulatorXcode9;
if (!BIOMETRICS[biometricName]) {
const bio = Object.keys(BIOMETRICS).filter(function (key) {
return BIOMETRICS[key].menuName === biometricName.menuName;
});
if (bio.length === 0) {
throw new Error(`${biometricName} is not a valid biometric. Use one of: ${JSON.stringify(_.keys(BIOMETRICS))}`);
}
return BIOMETRICS[biometricName];
return biometricName;
}

/**
Expand Down

0 comments on commit 476635a

Please sign in to comment.