diff --git a/bin/templates/cordova/lib/run.js b/bin/templates/cordova/lib/run.js index b97fce2038..4d7927ceda 100644 --- a/bin/templates/cordova/lib/run.js +++ b/bin/templates/cordova/lib/run.js @@ -108,7 +108,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); });