From f350eb188d417dd17145153925989c1edfc08050 Mon Sep 17 00:00:00 2001 From: "Henning P. Schmiedehausen" Date: Tue, 28 May 2024 08:37:32 -0700 Subject: [PATCH] Event ignores filter and pattern for multiple events When registering multiple events at once, the recursive code ignores passed in filter and pattern value. --- stdlib/event/event.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/event/event.lua b/stdlib/event/event.lua index e9d3c213..af8bfda2 100644 --- a/stdlib/event/event.lua +++ b/stdlib/event/event.lua @@ -136,7 +136,7 @@ function Event.register(event_id, handler, filter, pattern, options) --Recursively handle event id tables if Type.Table(event_id) then for _, id in pairs(event_id) do - Event.register(id, handler) + Event.register(id, handler, pattern, options) end return Event end @@ -206,7 +206,7 @@ function Event.remove(event_id, handler, filter, pattern) -- Handle recursion here if Type.Table(event_id) then for _, id in pairs(event_id) do - Event.remove(id, handler) + Event.remove(id, handler, filter, pattern) end return Event end