Rules: check if properties of a rule exist
Actually check if properties are set now, since we can also only apply callbacks now. Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
6ee5122462
commit
3e3395a6a0
|
@ -94,8 +94,10 @@ function apply(c)
|
|||
local callbacks = {}
|
||||
for _, entry in ipairs(rules) do
|
||||
if match(c, entry.rule) then
|
||||
for property, value in pairs(entry.properties) do
|
||||
props[property] = value
|
||||
if entry.properties then
|
||||
for property, value in pairs(entry.properties) do
|
||||
props[property] = value
|
||||
end
|
||||
end
|
||||
if entry.callback then
|
||||
table.insert(callbacks, entry.callback)
|
||||
|
|
Loading…
Reference in New Issue