summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/core-env.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/core-env.lua')
-rw-r--r--tex/context/base/mkiv/core-env.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/core-env.lua b/tex/context/base/mkiv/core-env.lua
index 583a6ed1e..0ef37a6d6 100644
--- a/tex/context/base/mkiv/core-env.lua
+++ b/tex/context/base/mkiv/core-env.lua
@@ -57,7 +57,7 @@ setmetatableindex(texmodes, function(t,k)
local m = modes[k]
if m then
return m()
- else
+ elseif k then
local n = "mode>" .. k
if cache[n].mode == 0 then
return false
@@ -65,6 +65,8 @@ setmetatableindex(texmodes, function(t,k)
rawset(modes,k, function() return texgetcount(n) == 1 end)
return texgetcount(n) == 1 -- 2 is prevented
end
+ else
+ return false
end
end)
setmetatablenewindex(texmodes, function(t,k)