Skip to content

Commit

Permalink
#1037 check nil
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Apr 11, 2022
1 parent 3b642df commit 654cca0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions script/workspace/require-path.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,18 @@ local function removeVisiblePath(uri)
return
end
for _, scp in ipairs(workspace.folders) do
scp:get('visiblePath')[path] = nil
if scp:get('visiblePath') then
scp:get('visiblePath')[path] = nil
end
---@type collector
local clt = scp:get('requireName')
if clt then
clt:dropUri(uri)
end
end
scope.fallback:get('visiblePath')[path] = nil
if scope.fallback:get('visiblePath') then
scope.fallback:get('visiblePath')[path] = nil
end
---@type collector
local clt = scope.fallback:get('requireName')
if clt then
Expand Down

0 comments on commit 654cca0

Please sign in to comment.