mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Removed isArray branch in checkCycles as it was unnecessary
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user