From c26082d36212f83881a3fa8795dd9af4c3cc68f1 Mon Sep 17 00:00:00 2001 From: Gearoid M Date: Mon, 18 Jun 2018 15:15:24 +0900 Subject: [PATCH] Fix unsafe property access in run.js (#445) --- bin/templates/cordova/lib/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/templates/cordova/lib/run.js b/bin/templates/cordova/lib/run.js index b97fce20..4d7927ce 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); });