fix appearance broken by #3812

This commit is contained in:
Lendemor 2024-11-20 17:57:19 +01:00
parent 229df1ce09
commit 7306cdddde

View File

@ -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),