diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-05 17:13:45 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-05 17:13:45 +0800 |
commit | 366e5f9a2083bf12802cb237b1eaa2efac47f2a4 (patch) | |
tree | 363090af040d71b05b65fc72f6da3eb3978b7944 | |
parent | bc1baf261f3552ab5a6731389bd21824530a454b (diff) | |
download | lua-language-server-366e5f9a2083bf12802cb237b1eaa2efac47f2a4.zip |
fix error
-rw-r--r-- | script/core/generic.lua | 2 | ||||
-rw-r--r-- | script/core/infer.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/script/core/generic.lua b/script/core/generic.lua index 47cad7df..f5ede5d7 100644 --- a/script/core/generic.lua +++ b/script/core/generic.lua @@ -192,7 +192,7 @@ local function buildValues(closure) for _, doc in ipairs(protoFunction.bindDocs) do if doc.type == 'doc.param' then local extends = doc.extends - local index = extends.paramIndex + local index = extends and extends.paramIndex if index then local param = params and params[index] closure.params[index] = param and createValue(closure, extends, function (road, key, proto) diff --git a/script/core/infer.lua b/script/core/infer.lua index ed802a58..fc84e597 100644 --- a/script/core/infer.lua +++ b/script/core/infer.lua @@ -541,7 +541,7 @@ function m.searchInfers(source, field, mark) end if source.docParam then local docType = source.docParam.extends - if docType.type == 'doc.type' then + if docType and docType.type == 'doc.type' then for _, def in ipairs(docType.types) do if def.typeGeneric then searchInfer(def, infers, mark) |