From 681b61600025c67e1438c2252917ff078ff0db2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Wed, 20 Nov 2024 11:12:52 -0800 Subject: [PATCH] fix appearance broken by #3812 (#4403) * fix appearance broken by #3812 * fix again to pass tests --- reflex/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reflex/app.py b/reflex/app.py index 26b2cce20..afc40e3b8 100644 --- a/reflex/app.py +++ b/reflex/app.py @@ -850,8 +850,6 @@ class App(MiddlewareMixin, LifespanMixin): 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}") @@ -1007,6 +1005,9 @@ class App(MiddlewareMixin, LifespanMixin): compile_results.append( compiler.compile_contexts(self.state, self.theme), ) + if self.theme is not None: + # Fix #2992 by removing the top-level appearance prop + self.theme.appearance = None progress.advance(task) # Compile the app root.