From cac01a34c92fd8f80a42dae4b5ce78e82b950f14 Mon Sep 17 00:00:00 2001 From: qeffects Date: Mon, 27 Dec 2021 00:53:16 +0200 Subject: [PATCH] callbacks fix --- hooks/callback.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/callback.lua b/hooks/callback.lua index e1f677b..acff0c5 100644 --- a/hooks/callback.lua +++ b/hooks/callback.lua @@ -8,9 +8,9 @@ local context = require(path.. ".core.stack") return function (name, callback) local activeContext = context.getContext() - if context.element[name] then + if activeContext.element[name] then error('callback with name '..name..' would interfere with internal fields') end - context.element[name] = callback + activeContext.element[name] = callback end \ No newline at end of file