Browse Source

handle component at largest scope

Khaleel Al-Adhami 4 months ago
parent
commit
19b6fe9efc
1 changed files with 3 additions and 0 deletions
  1. 3 0
      reflex/compiler/compiler.py

+ 3 - 0
reflex/compiler/compiler.py

@@ -570,6 +570,9 @@ def compile_unevaluated_page(
     if isinstance(component, tuple):
     if isinstance(component, tuple):
         component = Fragment.create(*component)
         component = Fragment.create(*component)
 
 
+    if isinstance(component, Var):
+        component = Fragment.create(component)
+
     component._add_style_recursive(style or {}, theme)
     component._add_style_recursive(style or {}, theme)
 
 
     enable_state = False
     enable_state = False