summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-04-22 13:08:23 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-04-22 13:08:35 +0800
commit2bf501a60f368c4a20adf1608b0702b42bef322e (patch)
treed625f7fbbad3f0a132ab27a10b335d9c47b3bf73
parentd48e7f52fbfa43862bd21c0de008b9f6dd08dfb9 (diff)
downloadlua-language-server-2bf501a60f368c4a20adf1608b0702b42bef322e.zip
#158
-rw-r--r--script/vm/function.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/vm/function.lua b/script/vm/function.lua
index 1ba01363..be58bf7c 100644
--- a/script/vm/function.lua
+++ b/script/vm/function.lua
@@ -486,7 +486,9 @@ function mt:setEmmy(params, returns, overLoads)
self._emmyParams = params
for _, param in ipairs(params) do
param:getSource():set('emmy function', self)
- param:getSource()[1]:set('emmy function', self)
+ if param:getSource()[1] then
+ param:getSource()[1]:set('emmy function', self)
+ end
end
end
if returns then