Originally Posted by Phanx
Oh, you're right, I wasn't looking at that part. That line should probably be changed to:
Code:
if func and f[event] and f[event][func] ~= nil then
|
Yup. I did exactly that, when implementing your suggestion.
I've also dropped a check for "func = handler[func]" as redundant and not really adding to the performance.
So far, so good. Though, I should admit, that looking at someone else's code when writing your own tend to cause more harm than good
Mistyped variable names make it quite hard to debug issues. Especially when they do not cause outright errors.