diff --git a/reflex/event.py b/reflex/event.py index 6da5f995a..6cc15cbba 100644 --- a/reflex/event.py +++ b/reflex/event.py @@ -1345,8 +1345,8 @@ def check_fn_match_arg_spec( EventFnArgMismatch: Raised if the number of mandatory arguments do not match """ user_args = inspect.getfullargspec(user_func).args - # Drop the first argument if it's a method - if inspect.ismethod(user_func): + # Drop the first argument if it's a bound method + if inspect.ismethod(user_func) and user_func.__self__ is not None: user_args = user_args[1:] user_default_args = inspect.getfullargspec(user_func).defaults