From d88186bc1199e960122a09aac7a0fa2d255a61a8 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 24 Nov 2015 17:06:17 -0800 Subject: [PATCH] Removed isArray branch in checkCycles as it was unnecessary --- src/compiler/utilities.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) 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; } }