aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--error_handling.lua3
-rw-r--r--error_handling.moon1
2 files changed, 4 insertions, 0 deletions
diff --git a/error_handling.lua b/error_handling.lua
index 6774e55..605a013 100644
--- a/error_handling.lua
+++ b/error_handling.lua
@@ -133,6 +133,9 @@ enhance_error = function(error_message)
end
local scan
scan = function(t, is_lua_id)
+ if not (t) then
+ return
+ end
for k, v in pairs(t) do
if type(k) == 'string' and type(v) == 'function' then
if not (is_lua_id) then
diff --git a/error_handling.moon b/error_handling.moon
index d6a0881..ea126e8 100644
--- a/error_handling.moon
+++ b/error_handling.moon
@@ -106,6 +106,7 @@ enhance_error = (error_message)->
-- Globals and global compile rules:
scan = (t, is_lua_id)->
+ return unless t
for k,v in pairs(t)
if type(k) == 'string' and type(v) == 'function'
k = k\from_lua_id! unless is_lua_id