mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-05 00:37:04 -05:00
fix(49838): "Extract function" refactoring action is disabled for a wrong reason (#49840)
* fix(49838): allow extracting functions with a break statement inside loop context * remove useless flag * add more tests
This commit is contained in:
@@ -551,7 +551,7 @@ namespace ts.refactor.extractSymbol {
|
||||
const savedPermittedJumps = permittedJumps;
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.IfStatement:
|
||||
permittedJumps = PermittedJumps.None;
|
||||
permittedJumps &= ~PermittedJumps.Return;
|
||||
break;
|
||||
case SyntaxKind.TryStatement:
|
||||
// forbid all jumps inside try blocks
|
||||
|
||||
Reference in New Issue
Block a user