summaryrefslogtreecommitdiff
path: root/script/core/linker.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-04-15 21:11:30 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-04-15 21:11:30 +0800
commita656626742e3a475731a4d27e0a7f9292ecbaa22 (patch)
tree7aed61c51f9871ae06bf8c611094d58ca352eeb7 /script/core/linker.lua
parentf09d553bc1570112d8e405fb0e89491fc7380bcd (diff)
downloadlua-language-server-a656626742e3a475731a4d27e0a7f9292ecbaa22.zip
stash
Diffstat (limited to 'script/core/linker.lua')
-rw-r--r--script/core/linker.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script/core/linker.lua b/script/core/linker.lua
index 64aaef1c..46a76127 100644
--- a/script/core/linker.lua
+++ b/script/core/linker.lua
@@ -147,7 +147,10 @@ local function getID(source)
end
util.revertTable(IDList)
local id = table.concat(IDList, '|')
- local parentID = table.concat(IDList, '|', 1, -2)
+ local parentID
+ if #IDList > 1 then
+ parentID = table.concat(IDList, '|', 1, -2)
+ end
return id, current, parentID
end