Skip to content

Commit

Permalink
refactor(cache): tiny simplification to walkTree
Browse files Browse the repository at this point in the history
- the `acyclic` var is literally only used in one place, directly below its instantiation
  - so don't use a var at all instead for simplicity
  • Loading branch information
agilgur5 committed Jun 12, 2022
1 parent 03cfb04 commit 052b01f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/tscache.ts
Expand Up @@ -177,9 +177,7 @@ export class TsCache

public walkTree(cb: (id: string) => void | false): void
{
const acyclic = alg.isAcyclic(this.dependencyTree);

if (acyclic)
if (alg.isAcyclic(this.dependencyTree))
{
alg.topsort(this.dependencyTree).forEach(id => cb(id));
return;
Expand Down

0 comments on commit 052b01f

Please sign in to comment.