You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by dp...@apache.org on 2018/12/13 18:49:21 UTC

[cordova-ios] branch master updated: Fix issue after updating to macOS 10.14.2.

This is an automated email from the ASF dual-hosted git repository.

dpogue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git


The following commit(s) were added to refs/heads/master by this push:
     new 8b6f35c  Fix issue after updating to macOS 10.14.2.
8b6f35c is described below

commit 8b6f35c10e43e89e0d2cd08b77cc1450fcdac9e3
Author: amorgulis <am...@users.noreply.github.com>
AuthorDate: Thu Dec 13 10:14:20 2018 -0800

    Fix issue after updating to macOS 10.14.2.
    
    After updating to macOS 10.14.2, running `cordova run ios` causes error `Cannot read property 'name' of undefined`. It turns out that the problem is due to device.name including the '-'. It seems this changed with the update to Xcode 10.1 which seems to have been bundled along with the 10.14.2 update.
---
 bin/templates/scripts/cordova/lib/list-emulator-build-targets | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/templates/scripts/cordova/lib/list-emulator-build-targets b/bin/templates/scripts/cordova/lib/list-emulator-build-targets
index 2cd8e46..8f1ffab 100755
--- a/bin/templates/scripts/cordova/lib/list-emulator-build-targets
+++ b/bin/templates/scripts/cordova/lib/list-emulator-build-targets
@@ -50,7 +50,7 @@ function listEmulatorBuildTargets () {
             var availableDevices = Object.keys(devices).reduce(function (availAcc, deviceCategory) {
                 var availableDevicesInCategory = devices[deviceCategory];
                 availableDevicesInCategory.forEach(function (device) {
-                    if (device.name === deviceType.name.replace(/\-inch/g, ' inch')) {
+                    if (device.name === deviceType.name || device.name === deviceType.name.replace(/\-inch/g, ' inch')) {
                         // Check new flag isAvailable (XCode 10.1+) or legacy string availability (XCode 10 and lower)
                         if (device.isAvailable || (device.availability && device.availability.toLowerCase().indexOf('unavailable') < 0)) {
                             availAcc.push(device);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org