diff --git a/lib/compiler-finder.ts b/lib/compiler-finder.ts index 8c3731a06..ba99d17e8 100644 --- a/lib/compiler-finder.ts +++ b/lib/compiler-finder.ts @@ -258,7 +258,7 @@ export class CompilerFinder { .split(':') .filter(a => a !== ''), options: actualOptions, - versionFlag: props('versionFlag', '').split('|'), + versionFlag: props('versionFlag')?.split('|'), versionRe: props('versionRe'), explicitVersion: props('explicitVersion'), compilerType: props('compilerType', ''), diff --git a/types/compiler.interfaces.ts b/types/compiler.interfaces.ts index b8b94fb0d..54accb3ac 100644 --- a/types/compiler.interfaces.ts +++ b/types/compiler.interfaces.ts @@ -36,7 +36,7 @@ export type CompilerInfo = { baseName: string; alias: string[]; options: string; - versionFlag?: string[]; + versionFlag: string[] | undefined; versionRe?: string; explicitVersion?: string; compilerType: string;