refactor(cache): tiny simplification to walkTree (#359)

- 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
This commit is contained in:
Anton Gilgur 2022-06-14 12:03:57 -04:00 committed by GitHub
parent a31cda15a9
commit 42c94b8c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,9 +178,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;