Skip to content

Commit

Permalink
check nil
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Nov 13, 2024
1 parent 81a0d7a commit de70c05
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions script/core/code-action.lua
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,9 @@ local function checkMissingRequire(results, uri, start, finish)
end

local function addRequires(global, endpos)
if not global then
return
end
autoreq.check(state, global, endpos, function (moduleFile, _stemname, _targetSource, fullKeyPath)
local visiblePaths = rpath.getVisiblePath(uri, furi.decode(moduleFile))
if not visiblePaths or #visiblePaths == 0 then return end
Expand Down

0 comments on commit de70c05

Please sign in to comment.