mirror of
https://github.com/github/codeql.git
synced 2026-01-09 04:30:21 +01:00
TS: fix extraction of binding pattern with default
This commit is contained in:
@@ -1612,7 +1612,7 @@ public class TypeScriptASTConverter {
|
||||
if (hasChild(element, "dotDotDotToken")) {
|
||||
propVal = new RestElement(eltLoc, propKey);
|
||||
} else if (hasChild(element, "initializer")) {
|
||||
propVal = new AssignmentPattern(eltLoc, "=", propKey, convertChild(element, "initializer"));
|
||||
propVal = new AssignmentPattern(eltLoc, "=", convertChild(element, "name"), convertChild(element, "initializer"));
|
||||
} else {
|
||||
propVal = convertChild(element, "name");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user