File tree Expand file tree Collapse file tree
src/reactpy/executors/asgi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,11 +106,10 @@ class ReactPyPyscriptApp(ReactPyApp):
106106 def render_index_html (self ) -> None :
107107 """Process the index.html and store the results in this class."""
108108 head_content = vdom_head_to_html (self .parent .html_head )
109- body_content = (
110- ""
111- if self .parent .prepend_body is None
112- else reactpy_to_string (self .parent .prepend_body )
113- )
109+ if not self .parent .prepend_body or self .parent .prepend_body == ...:
110+ prepend_body = ""
111+ else :
112+ prepend_body = reactpy_to_string (self .parent .prepend_body )
114113 pyscript_setup = pyscript_setup_html (
115114 extra_py = self .parent .extra_py ,
116115 extra_js = self .parent .extra_js ,
@@ -128,7 +127,7 @@ def render_index_html(self) -> None:
128127 f'<html lang="{ self .parent .html_lang } ">'
129128 f"{ head_content } "
130129 "<body>"
131- f"{ body_content } "
130+ f"{ prepend_body } "
132131 f"{ pyscript_component } "
133132 "</body>"
134133 "</html>"
You can’t perform that action at this time.
0 commit comments