Skip to content

Commit d88186b

Browse files
committed
Removed isArray branch in checkCycles as it was unnecessary
1 parent 0ad2efc commit d88186b

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/compiler/utilities.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,18 +2439,9 @@ namespace ts {
24392439

24402440
stack.push(value);
24412441

2442-
if (isArray(value)) {
2443-
for (const entry of value) {
2444-
if (hasCycles(entry, stack)) {
2445-
return true;
2446-
}
2447-
}
2448-
}
2449-
else {
2450-
for (const key in value) {
2451-
if (hasProperty(value, key) && hasCycles(value[key], stack)) {
2452-
return true;
2453-
}
2442+
for (const key in value) {
2443+
if (hasProperty(value, key) && hasCycles(value[key], stack)) {
2444+
return true;
24542445
}
24552446
}
24562447

0 commit comments

Comments
 (0)