Skip to content

Commit 06a1398

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Fix undefined is not a function error
If android is not set to PATH and tns build android command is executed, undefined is not a function errror is thrown
1 parent 6f40e15 commit 06a1398

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)