summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/core/guide.lua2
-rw-r--r--script/text-merger.lua6
2 files changed, 7 insertions, 1 deletions
diff --git a/script/core/guide.lua b/script/core/guide.lua
index 45c93f69..fee057d6 100644
--- a/script/core/guide.lua
+++ b/script/core/guide.lua
@@ -2606,7 +2606,7 @@ local function findGenericFromArgIndexToReturnIndex(func, argIndex)
local paramType
for _, doc in ipairs(func.bindDocs) do
if doc.type == 'doc.param' then
- if doc.extends.paramIndex == argIndex then
+ if doc.extends and doc.extends.paramIndex == argIndex then
paramType = doc.extends
break
end
diff --git a/script/text-merger.lua b/script/text-merger.lua
index aa124fdd..003ee187 100644
--- a/script/text-merger.lua
+++ b/script/text-merger.lua
@@ -10,6 +10,9 @@ local function splitRows(text)
end
local function getLeft(text, char)
+ if not text then
+ return ''
+ end
local left
local length = util.utf8Len(text)
@@ -25,6 +28,9 @@ local function getLeft(text, char)
end
local function getRight(text, char)
+ if not text then
+ return ''
+ end
local right
local length = util.utf8Len(text)