summaryrefslogtreecommitdiff
path: root/script/core/noder.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-14 14:58:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-14 14:58:15 +0800
commit18ae98ec2c658b6ea13046132d314604a8ad7917 (patch)
treeff477a74134d7843dc13b6c6c7dc559cfd84828e /script/core/noder.lua
parent28d67699c4eb747d6b287c7ac67262b8b19ee73b (diff)
downloadlua-language-server-18ae98ec2c658b6ea13046132d314604a8ad7917.zip
check nil
Diffstat (limited to 'script/core/noder.lua')
-rw-r--r--script/core/noder.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/noder.lua b/script/core/noder.lua
index 1f8005e3..54fc484c 100644
--- a/script/core/noder.lua
+++ b/script/core/noder.lua
@@ -1264,6 +1264,9 @@ end
---@param root parser.guide.object
---@param id string
function m.removeID(root, id)
+ if not id then
+ return
+ end
root = guide.getRoot(root)
local noders = root._noders
noders[id] = nil