Skip to content

Commit

Permalink
callbacks fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qeffects committed Dec 26, 2021
1 parent 72c4eb8 commit cac01a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/callback.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cac01a3

Please sign in to comment.