Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codeflash/languages/javascript/frameworks/react/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _extract_child_components(component_source: str, analyzer: TreeSitterAnalyze

def _extract_context_subscriptions(component_source: str) -> list[str]:
"""Find React context subscriptions via useContext calls."""
return [match.group(1) for match in _CONTEXT_RE.finditer(component_source)]
return _CONTEXT_RE.findall(component_source)


def _find_type_definition(type_name: str, source: str, analyzer: TreeSitterAnalyzer) -> str | None:
Expand Down
Loading