summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/core/generic.lua2
-rw-r--r--script/core/infer.lua2
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)