Skip to content

Commit 7baf51c

Browse files
committed
fix runtime error
1 parent e4588e9 commit 7baf51c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

script/vm/getDocs.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ local noder = require 'core.noder'
1111
---@param name? string
1212
---@return parser.guide.object[]
1313
function vm.getDocDefines(uri, name)
14+
if type(name) ~= 'string' then
15+
return {}
16+
end
1417
local cache = vm.getCache 'getDocDefines'
1518
if cache[name] then
1619
return cache[name]

0 commit comments

Comments
 (0)