summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
authorCppCXY <812125110@qq.com>2022-02-22 14:10:21 +0800
committerCppCXY <812125110@qq.com>2022-02-22 14:10:21 +0800
commitc920f9630e5a1aa88c993ad22e786a2f9232b21e (patch)
treee59992179500dc3b0bb961b4033be350cd5420a5 /script/core
parentaa13abab66752f42081f8d61d7fb415d03953364 (diff)
parentd57c21e585e7285583b7379e9e955da3b1345508 (diff)
downloadlua-language-server-c920f9630e5a1aa88c993ad22e786a2f9232b21e.zip
Merge branch 'master' of https://github.com/sumneko/lua-language-server
Diffstat (limited to 'script/core')
-rw-r--r--script/core/noder.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/core/noder.lua b/script/core/noder.lua
index 0a04a744..fcc6b6f4 100644
--- a/script/core/noder.lua
+++ b/script/core/noder.lua
@@ -186,7 +186,11 @@ local function getFieldEventName(field)
if not secondTypeUnit or secondTypeUnit.type ~= 'doc.type.function' then
return nil
end
- local eventName = firstEnum[1]:match [[^['"](.+)['"]$]]
+ local enmuStr = firstEnum[1]
+ if type(enmuStr) ~= 'string' then
+ return nil
+ end
+ local eventName = enmuStr:match [[^['"](.+)['"]$]]
field._eventName = eventName
return eventName
end