Skip to content

Commit ba6d58e

Browse files
FatmeFatme
Fatme
authored and
Fatme
committed
Merge pull request #902 from NativeScript/fatme/fix-undefined-is-not-a-function-error
Fix undefined is not a function error
2 parents 6f40e15 + 06a1398 commit ba6d58e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/services/android-project-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
417417
try {
418418
this.$childProcess.exec('android list targets').wait();
419419
} catch(error) {
420-
if (error.match(/command\snot\sfound/)) {
420+
if (error.message.match(/command\snot\sfound/)) {
421421
this.$errors.fail("The command \"android\" failed. Make sure you have the latest Android SDK installed, and the \"android\" command (inside the tools/ folder) is added to your path.");
422422
} else {
423423
this.$errors.fail("An error occurred while listing Android targets");

0 commit comments

Comments
 (0)