From 33c608588b1b3333b6e439bd33c9ccbc0e1618ac Mon Sep 17 00:00:00 2001 From: Jack Frain Date: Mon, 14 Oct 2024 15:33:02 -0400 Subject: [PATCH] fix(aos): only remove handler if name matches --- process/handlers.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/process/handlers.lua b/process/handlers.lua index 6507a916..7708f29d 100644 --- a/process/handlers.lua +++ b/process/handlers.lua @@ -235,7 +235,9 @@ function handlers.remove(name) end local idx = findIndexByProp(handlers.list, "name", name) - table.remove(handlers.list, idx) + if idx ~= nil and idx > 0 then + table.remove(handlers.list, idx) + end end