Skip to content

Commit c3f9e7e

Browse files
committed
[js] Make code ugly so the compiler doesn't (incorrectly) detect an unreachable
branch.
1 parent 72f2c0f commit c3f9e7e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

javascript/webdriver/promise.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2873,10 +2873,12 @@ var TaskQueue = goog.defineClass(EventEmitter, {
28732873
vlog(2, () => this + ' skipping blocked task ' + task, this);
28742874
task.queue = null;
28752875
task = null;
2876-
continue;
2876+
// TODO: recurse when tail-call optimization is available in node.
2877+
} else {
2878+
break;
28772879
}
2878-
return task;
28792880
}
2881+
return task;
28802882
}
28812883
});
28822884

0 commit comments

Comments
 (0)