Skip to content

Commit

Permalink
feat(javascript): unanchored method_definition (#1518)
Browse files Browse the repository at this point in the history
feat: unanchored method_definition
  • Loading branch information
cfabianski authored Feb 28, 2024
1 parent adfe84c commit 77051de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/languages/javascript/pattern/pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (*Pattern) IsAnchored(node *tree.Node) (bool, bool) {
// arrow functions statement_block
// function statement_block
// method statement_block
unAnchored := []string{"statement_block", "class_body", "object_pattern", "named_imports"}
unAnchored := []string{"statement_block", "class_body", "object_pattern", "named_imports", "method_definition"}

isAnchored := !slices.Contains(unAnchored, parent.Type())
return isAnchored, isAnchored
Expand Down

0 comments on commit 77051de

Please sign in to comment.