diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-02-21 15:34:04 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-02-21 15:34:04 +0800 |
commit | e4588e924ae897f4b6d5d6133200a6d85dc4dfe0 (patch) | |
tree | 2f69040f10034b75f4347e5ca8ffa7838020e4a4 /script/core | |
parent | d59f9824a567aa1a18b5e0e794efdb2e658bbb35 (diff) | |
download | lua-language-server-e4588e924ae897f4b6d5d6133200a6d85dc4dfe0.zip |
fix runtime errors
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 |