diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-02-21 15:36:54 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-02-21 15:36:54 +0800 |
commit | 7baf51cb7879aa39d4d9b9911300e49ee34d3ace (patch) | |
tree | 71035fe1bfd5cbb2fed9bf7acd30c66b23401390 /script/vm/getDocs.lua | |
parent | e4588e924ae897f4b6d5d6133200a6d85dc4dfe0 (diff) | |
download | lua-language-server-7baf51cb7879aa39d4d9b9911300e49ee34d3ace.zip |
fix runtime error
Diffstat (limited to 'script/vm/getDocs.lua')
-rw-r--r-- | script/vm/getDocs.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script/vm/getDocs.lua b/script/vm/getDocs.lua index 59651ee9..4aeda446 100644 --- a/script/vm/getDocs.lua +++ b/script/vm/getDocs.lua @@ -11,6 +11,9 @@ local noder = require 'core.noder' ---@param name? string ---@return parser.guide.object[] function vm.getDocDefines(uri, name) + if type(name) ~= 'string' then + return {} + end local cache = vm.getCache 'getDocDefines' if cache[name] then return cache[name] |