diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 2034a2d276d..e649edf2115 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -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; } }