From dcef54ec954aea628e3e4fe26693ef72c0635d36 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 16 Mar 2018 11:51:46 +0000 Subject: [Fix] Handle callbacks that returns table of options --- lualib/lua_squeeze_rules.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lualib') diff --git a/lualib/lua_squeeze_rules.lua b/lualib/lua_squeeze_rules.lua index d04352a68..5db715fb1 100644 --- a/lualib/lua_squeeze_rules.lua +++ b/lualib/lua_squeeze_rules.lua @@ -38,7 +38,12 @@ local function gen_lua_squeeze_function(order) if type(first) == 'boolean' then if first then table.remove(ret, 1) - task:insert_result(sym, 1.0, ret) + + if type(ret[1]) == 'table' then + task:insert_result(sym, 1.0, ret[1]) + else + task:insert_result(sym, 1.0, ret) + end end elseif type(first) == 'number' then table.remove(ret, 1) -- cgit v1.2.3