Removed isArray branch in checkCycles as it was unnecessary

This commit is contained in:
Ron Buckton 2015-11-24 17:06:17 -08:00
parent 0ad2efcd61
commit d88186bc11

View File

@ -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;
}
}