瀏覽代碼

put default values for computed var in case it errors (#4867)

* put default values for computed var in case it errors

* remove special error handling for computer vars
Khaleel Al-Adhami 2 月之前
父節點
當前提交
e93569c8f0
共有 1 個文件被更改,包括 1 次插入10 次删除
  1. 1 10
      reflex/compiler/utils.py

+ 1 - 10
reflex/compiler/utils.py

@@ -187,16 +187,7 @@ def compile_state(state: Type[BaseState]) -> dict:
     Returns:
         A dictionary of the compiled state.
     """
-    try:
-        initial_state = state(_reflex_internal_init=True).dict(initial=True)
-    except Exception as e:
-        log_path = save_error(e)
-        console.warn(
-            f"Failed to compile initial state with computed vars. Error log saved to {log_path}"
-        )
-        initial_state = state(_reflex_internal_init=True).dict(
-            initial=True, include_computed=False
-        )
+    initial_state = state(_reflex_internal_init=True).dict(initial=True)
     try:
         _ = asyncio.get_running_loop()
     except RuntimeError: