diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 794018a2fde8f..cd30229ff412c 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -1037,8 +1037,9 @@ namespace ts { savedAffectedFilesPendingEmitIndex = state.affectedFilesPendingEmitIndex; } - if (kind === BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram) + if (kind === BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram) { assertSourceFileOkWithoutNextAffectedCall(state, targetSourceFile); + } const result = handleNoEmitOptions(builderProgram, targetSourceFile, writeFile, cancellationToken); if (result) return result;