mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Don't crash on no args
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
export function executeCommandLine(args: string[]): void {
|
||||
if ((args[0].toLowerCase() === "--build") || (args[0].toLowerCase() === "-b")) {
|
||||
if (args.length > 0 && ((args[0].toLowerCase() === "--build") || (args[0].toLowerCase() === "-b"))) {
|
||||
return performBuild(createCompilerHost({}), createDiagnosticReporter(sys), args.slice(1), sys);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user