Skip to content

Commit

Permalink
fix: Prevent crash in findMatchingSimulator (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
zubko authored and grabbou committed Jan 11, 2019
1 parent 9aaa508 commit 9ed4c55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/local-cli/runIOS/findMatchingSimulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function findMatchingSimulator(simulators, simulatorString) {
const parsedSimulatorName = simulatorString
? simulatorString.match(/(.*)? (?:\((.*)?\))?/)
: [];
if (parsedSimulatorName[2] !== undefined) {
if (parsedSimulatorName && parsedSimulatorName[2] !== undefined) {
var simulatorVersion = parsedSimulatorName[2];
var simulatorName = parsedSimulatorName[1];
} else {
Expand Down

0 comments on commit 9ed4c55

Please sign in to comment.