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
298f773357
commit
4c2c741743
|
@ -94,9 +94,11 @@ function apply(c)
|
||||||
local callbacks = {}
|
local callbacks = {}
|
||||||
for _, entry in ipairs(rules) do
|
for _, entry in ipairs(rules) do
|
||||||
if match(c, entry.rule) then
|
if match(c, entry.rule) then
|
||||||
|
if entry.properties then
|
||||||
for property, value in pairs(entry.properties) do
|
for property, value in pairs(entry.properties) do
|
||||||
props[property] = value
|
props[property] = value
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if entry.callback then
|
if entry.callback then
|
||||||
table.insert(callbacks, entry.callback)
|
table.insert(callbacks, entry.callback)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue