浏览代码

Format event handlers not in importable modules (#1875)

Nikhil Rao 1 年之前
父节点
当前提交
41872dfdc9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      reflex/utils/format.py

+ 1 - 1
reflex/utils/format.py

@@ -383,7 +383,7 @@ def get_event_handler_parts(handler: EventHandler) -> tuple[str, str]:
         state = vars(sys.modules[handler.fn.__module__])[state_name]
     except Exception:
         # If the state isn't in the module, just return the function name.
-        return ("", handler.fn.__qualname__)
+        return ("", to_snake_case(handler.fn.__qualname__))
 
     return (state.get_full_name(), name)