summaryrefslogtreecommitdiff
path: root/script/vm/node.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-06 05:10:17 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-06 05:10:17 +0800
commit989ffe2a809998605750d5400a9455e0b8d279c0 (patch)
tree991370b3e99a52529cff009bb0a7911d2432c2e7 /script/vm/node.lua
parentc4c0009ef28de6cd4bfe01c497cbb718f3c2dff8 (diff)
downloadlua-language-server-989ffe2a809998605750d5400a9455e0b8d279c0.zip
update
Diffstat (limited to 'script/vm/node.lua')
-rw-r--r--script/vm/node.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua
index b8b7917d..514625f1 100644
--- a/script/vm/node.lua
+++ b/script/vm/node.lua
@@ -32,7 +32,11 @@ function m.setNode(source, node)
end
local me = m.nodeCache[source]
if not me then
- m.nodeCache[source] = node
+ if node.type == 'union' then
+ m.nodeCache[source] = node:copy()
+ else
+ m.nodeCache[source] = node
+ end
return
end
if me == node then