From 7306cdddde46e0494080f01d8c5b1c3be5fa7240 Mon Sep 17 00:00:00 2001 From: Lendemor Date: Wed, 20 Nov 2024 17:57:19 +0100 Subject: [PATCH] fix appearance broken by #3812 --- reflex/app.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 26b2cce20..87ef2fac4 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -847,12 +847,6 @@ class App(MiddlewareMixin, LifespanMixin): (0, "AppWrap"): AppWrap.create() } - if self.theme is not None: - # If a theme component was provided, wrap the app with it - app_wrappers[(20, "Theme")] = self.theme - # Fix #2992 by removing the top-level appearance prop - self.theme.appearance = None - for route in self.unevaluated_pages: console.debug(f"Evaluating page: {route}") self._compile_page(route) @@ -1009,6 +1003,12 @@ class App(MiddlewareMixin, LifespanMixin): ) progress.advance(task) + if self.theme is not None: + # If a theme component was provided, wrap the app with it + app_wrappers[(20, "Theme")] = self.theme + # Fix #2992 by removing the top-level appearance prop + self.theme.appearance = None + # Compile the app root. compile_results.append( compiler.compile_app(app_root),