mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
CB-11132 Fix Error: Cannot read property 'match' of undefined in cordova-android emulator.js
This commit is contained in:
parent
e4ecbad3cb
commit
8951660393
2
bin/templates/cordova/lib/emulator.js
vendored
2
bin/templates/cordova/lib/emulator.js
vendored
@ -70,7 +70,7 @@ module.exports.list_images = function() {
|
||||
i++;
|
||||
img_obj['path'] = response[i].split('Path: ')[1].replace('\r', '');
|
||||
}
|
||||
if (response[i + 1].match(/\(API\slevel\s/) || response[i + 2].match(/\(API\slevel\s/)) {
|
||||
if (response[i + 1].match(/\(API\slevel\s/) || (response[i + 2] && response[i + 2].match(/\(API\slevel\s/))) {
|
||||
i++;
|
||||
var secondLine = response[i + 1].match(/\(API\slevel\s/) ? response[i + 1] : '';
|
||||
img_obj['target'] = (response[i] + secondLine).split('Target: ')[1].replace('\r', '');
|
||||
|
Loading…
Reference in New Issue
Block a user