summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/vm/compiler.lua2
-rw-r--r--script/vm/global.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 5a078e70..7a89cbf4 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1270,7 +1270,7 @@ local compilerSwitch = util.switch()
---@cast key string
vm.compileByParentNode(source.node, key, function (src)
vm.setNode(source, vm.compileNode(src))
- if src == source and source.value then
+ if src == source and source.value and source.value.type ~= 'nil' then
vm.setNode(source, vm.compileNode(source.value))
end
end)
diff --git a/script/vm/global.lua b/script/vm/global.lua
index 19474bb5..c1b5f320 100644
--- a/script/vm/global.lua
+++ b/script/vm/global.lua
@@ -552,7 +552,7 @@ function vm.compileByGlobal(source)
if vm.bindDocs(source) then
return true
end
- if source.value then
+ if source.value and source.value.type ~= 'nil' then
vm.setNode(source, vm.compileNode(source.value))
return true
end