Skip to content

Commit 99bff90

Browse files
committed
Logic bugfix
1 parent e2df528 commit 99bff90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BabelPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ function Plugin(babel) {
391391
if (isTailCall && (tryStack.length === 0 || finalStack.length > 0)) {
392392
if (tryStack.length > 0) {
393393
const inTryCatch = tryStack[tryStack.length - 1];
394-
if (path.getFunctionParent().node !== inTryCatch.function.node || finalStack.length > 0) {
394+
if (path.getFunctionParent().node === inTryCatch.function.node && finalStack.length > 0) {
395395
const inFinalizer = finalStack[finalStack.length - 1];
396396
if ("finalizer" in inTryCatch.node && inFinalizer === inTryCatch.node.finalizer) {
397397
path.node.expressions[0].argument.arguments.push(t.booleanLiteral(true));

0 commit comments

Comments
 (0)