Skip to content

Commit

Permalink
fix(jsx/tsx): correctly inline function call
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoP committed Jul 26, 2024
1 parent 1c7abd6 commit 7a90b6d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/refactoring/refactor/106.lua
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,15 @@ local function extract_setup(refactor)
-- C# parser parses expresions without a surrounding scope as childs of the
-- `global_statement` node, so it's imposibble to match them against
-- non-global statements
--
-- TSX/JSX parser parses isolated tags as having an expression parent
local number_of_function_calls = 0
if
not has_error
and refactor.filetype ~= "php"
and refactor.filetype ~= "cs"
and refactor.filetype ~= "typescriptreact"
and refactor.filetype ~= "javascriptreact"
then
--- @type string[]
local body_sexprs = {}
Expand Down

0 comments on commit 7a90b6d

Please sign in to comment.