From 9bcf93f5c4e8778bed389dfbdf720ab4c57bd75c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Fabianski?= Date: Wed, 28 Feb 2024 12:20:38 +0100 Subject: [PATCH] feat: unanchored method_definition --- internal/languages/javascript/pattern/pattern.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/languages/javascript/pattern/pattern.go b/internal/languages/javascript/pattern/pattern.go index 0863c7257..46eae988a 100644 --- a/internal/languages/javascript/pattern/pattern.go +++ b/internal/languages/javascript/pattern/pattern.go @@ -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