Browse Source

[Minor] Check selectors result for nil

tags/1.8.0
Vsevolod Stakhov 5 years ago
parent
commit
69e72be723
1 changed files with 7 additions and 5 deletions
  1. 7
    5
      src/plugins/lua/multimap.lua

+ 7
- 5
src/plugins/lua/multimap.lua View File

@@ -850,12 +850,14 @@ local function multimap_callback(task, rule)
selector = function()
local elts = rule.selector(task)

if type(elts) == 'table' then
for _,elt in ipairs(elts) do
match_rule(rule, elt)
if elts then
if type(elts) == 'table' then
for _,elt in ipairs(elts) do
match_rule(rule, elt)
end
else
match_rule(rule, elts)
end
else
match_rule(rule, elts)
end
end,
}

Loading…
Cancel
Save