Skip to content

Commit de70c05

Browse files
committed
check nil
1 parent 81a0d7a commit de70c05

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

script/core/code-action.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,9 @@ local function checkMissingRequire(results, uri, start, finish)
695695
end
696696

697697
local function addRequires(global, endpos)
698+
if not global then
699+
return
700+
end
698701
autoreq.check(state, global, endpos, function (moduleFile, _stemname, _targetSource, fullKeyPath)
699702
local visiblePaths = rpath.getVisiblePath(uri, furi.decode(moduleFile))
700703
if not visiblePaths or #visiblePaths == 0 then return end

0 commit comments

Comments
 (0)