diff --git a/js/sitl.js b/js/sitl.js index 2d0c2e2a1..338a3eea4 100644 --- a/js/sitl.js +++ b/js/sitl.js @@ -202,7 +202,9 @@ var SITLProcess = { } } - callback( sitlExePath + " " + args.join(" ") + "\n"); + if (callback) { + callback( sitlExePath + " " + args.join(" ") + "\n"); + } this.spawn(sitlExePath, args, callback); },