Skip to content

Commit 34a7689

Browse files
committed
fix(shouldIgnoreChain): fix issue with short/simple chain preserving logic
1 parent fd7c2a6 commit 34a7689

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/util/shouldIgnoreChain.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ function isComplexHandler(path: NodePath<t.Expression> | null): boolean {
2222
function hasComplexHandlers(path: NodePath<t.CallExpression>): boolean {
2323
for (const link of iterateChain(path)) {
2424
if (
25-
isComplexHandler(getThenHandler(path)) ||
26-
isComplexHandler(getCatchHandler(path)) ||
27-
isComplexHandler(getFinallyHandler(path))
25+
isComplexHandler(getThenHandler(link)) ||
26+
isComplexHandler(getCatchHandler(link)) ||
27+
isComplexHandler(getFinallyHandler(link))
2828
)
2929
return true
3030
}

0 commit comments

Comments
 (0)