summaryrefslogtreecommitdiff
path: root/script/vm/value.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-28 21:13:08 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-28 21:13:08 +0800
commita525372a28c87e6e759ae502aca3b1573a35155a (patch)
treee9424a88680ef6ac0afb4935e759a241c633802f /script/vm/value.lua
parent08b9dd387a9b912c68749018b7dfe3c1df7094d5 (diff)
downloadlua-language-server-a525372a28c87e6e759ae502aca3b1573a35155a.zip
fix
Diffstat (limited to 'script/vm/value.lua')
-rw-r--r--script/vm/value.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/vm/value.lua b/script/vm/value.lua
index 92f1a2b9..83265603 100644
--- a/script/vm/value.lua
+++ b/script/vm/value.lua
@@ -9,6 +9,9 @@ function vm.testCondition(source)
return nil
end
local node = vm.compileNode(source)
+ if node.optional then
+ return nil
+ end
local hasTrue, hasFalse
for n in node:eachObject() do
if n.type == 'boolean'