Skip to content

Commit 2118de0

Browse files
committed
Simplify returns
1 parent ef1cd50 commit 2118de0

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/compiler/program.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,13 +643,11 @@ namespace ts {
643643
// there is an old program, check if we can reuse its structure
644644
const oldRootNames = oldProgram.getRootFileNames();
645645
if (!arrayIsEqualTo(oldRootNames, rootNames)) {
646-
oldProgram.structureIsReused = StructureIsReused.Not;
647-
return StructureIsReused.Not;
646+
return oldProgram.structureIsReused = StructureIsReused.Not;
648647
}
649648

650649
if (!arrayIsEqualTo(options.types, oldOptions.types)) {
651-
oldProgram.structureIsReused = StructureIsReused.Not;
652-
return StructureIsReused.Not;
650+
return oldProgram.structureIsReused = StructureIsReused.Not;
653651
}
654652

655653
// check if program source files has changed in the way that can affect structure of the program

0 commit comments

Comments
 (0)