diff options
Diffstat (limited to 'lualib/lua_selectors/init.lua')
-rw-r--r-- | lualib/lua_selectors/init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lualib/lua_selectors/init.lua b/lualib/lua_selectors/init.lua index cc44d0b01..e971e14c3 100644 --- a/lualib/lua_selectors/init.lua +++ b/lualib/lua_selectors/init.lua @@ -64,9 +64,11 @@ local function implicit_tostring(t, ud_or_table) else return tostring(ud_or_table),'string' end - else + elseif t ~= 'nil' then return tostring(ud_or_table),'string' end + + return nil end local function process_selector(task, sel) @@ -350,6 +352,8 @@ exports.parse_selector = function(cfg, str) end local ret_type = type(ret) + + if ret_type == 'nil' then return nil end -- Now apply types heuristic if ret_type == 'string' then return ret,'string' |