Skip to content

Instantly share code, notes, and snippets.

@oidualc
Last active December 11, 2020 23:59
Show Gist options
  • Save oidualc/370954b9765e6e905d08d3eaa0453c3d to your computer and use it in GitHub Desktop.
Save oidualc/370954b9765e6e905d08d3eaa0453c3d to your computer and use it in GitHub Desktop.
Fix for semver error in cordova 6.4.0
--- a/platforms/android/cordova/lib/emulator.js 2018-08-08 12:34:38.000000000 +0200
+++ b/platforms/android/cordova/lib/emulator.js 2018-08-08 14:14:35.000000000 +0200
@@ -187,7 +187,7 @@
var api_level = avd.target.match(/\d+/);
if (api_level) {
var level = android_versions.get(api_level);
- avd.target = 'Android ' + level.semver + ' (API level ' + api_level + ')';
+ avd.target = 'Android ' + (level ? level.semver : '') + ' (API level ' + api_level + ')';
}
}
return avd;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment