diff options
author | CppCXY <812125110@qq.com> | 2022-02-22 14:10:21 +0800 |
---|---|---|
committer | CppCXY <812125110@qq.com> | 2022-02-22 14:10:21 +0800 |
commit | c920f9630e5a1aa88c993ad22e786a2f9232b21e (patch) | |
tree | e59992179500dc3b0bb961b4033be350cd5420a5 /script/core | |
parent | aa13abab66752f42081f8d61d7fb415d03953364 (diff) | |
parent | d57c21e585e7285583b7379e9e955da3b1345508 (diff) | |
download | lua-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.lua | 6 |
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 |