summaryrefslogtreecommitdiff
path: root/script/vm/node.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/vm/node.lua')
-rw-r--r--script/vm/node.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua
index 8b2bafd7..6023b1c3 100644
--- a/script/vm/node.lua
+++ b/script/vm/node.lua
@@ -131,6 +131,7 @@ function mt:setTruthy()
for index = #self, 1, -1 do
local c = self[index]
if c.type == 'nil'
+ or (c.type == 'global' and c.cate == 'type' and c.name == 'nil')
or (c.type == 'boolean' and c[1] == false)
or (c.type == 'doc.type.boolean' and c[1] == false) then
table.remove(self, index)
@@ -163,6 +164,7 @@ function mt:setFalsy()
for index = #self, 1, -1 do
local c = self[index]
if c.type == 'nil'
+ or (c.type == 'global' and c.cate == 'type' and c.name == 'nil')
or (c.type == 'boolean' and c[1] == true)
or (c.type == 'doc.type.boolean' and c[1] == true) then
goto CONTINUE