mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 07:45:18 -06:00
Removed isArray branch in checkCycles as it was unnecessary
This commit is contained in:
parent
0ad2efcd61
commit
d88186bc11
@ -2439,18 +2439,9 @@ namespace ts {
|
||||
|
||||
stack.push(value);
|
||||
|
||||
if (isArray(value)) {
|
||||
for (const entry of value) {
|
||||
if (hasCycles(entry, stack)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (const key in value) {
|
||||
if (hasProperty(value, key) && hasCycles(value[key], stack)) {
|
||||
return true;
|
||||
}
|
||||
for (const key in value) {
|
||||
if (hasProperty(value, key) && hasCycles(value[key], stack)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user