Fix unsafe property access

This commit is contained in:
Gearoid M 2018-06-18 15:15:24 +09:00 committed by Raphael von der Grün
parent 8fb49ec7ec
commit 1a8154c90e

View File

@ -106,7 +106,7 @@ module.exports.run = function (runOptions) {
// format than emulator.install expects.
// TODO: Update emulator/device.install to handle this change
return build.run.call(self, runOptions, resolvedTarget).then(function (buildResults) {
if (resolvedTarget.isEmulator) {
if (resolvedTarget && resolvedTarget.isEmulator) {
return emulator.wait_for_boot(resolvedTarget.target).then(function () {
return emulator.install(resolvedTarget, buildResults);
});