Skip to content

Commit 781fdc0

Browse files
committed
Fix routeUrlStrategy assignment to handle different types
1 parent 9dfbc7e commit 781fdc0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

sdk/python/examples/poc/src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def reset_page():
193193
page.overlay.clear()
194194
page.pop_dialog()
195195
page.theme = page.dark_theme = page.floating_action_button = None
196-
page.theme_mode = ft.ThemeMode.SYSTEM
196+
page.theme_mode = ft.ThemeMode.LIGHT
197197
page.update()
198198

199199
def render_example(slug: str):

sdk/python/packages/flet-web/src/flet_web/patch_index.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ def patch_index_html(
3232

3333
app_config.append(f"flet.noCdn={str(no_cdn).lower()};")
3434
app_config.append(f'flet.webRenderer="{web_renderer.value}";')
35-
app_config.append(f'flet.routeUrlStrategy="{route_url_strategy.value}";')
35+
app_config.append(
36+
f'flet.routeUrlStrategy="{route_url_strategy if isinstance(route_url_strategy, str) else route_url_strategy.value}";'
37+
)
3638

3739
if websocket_endpoint_path:
3840
app_config.append(f'flet.webSocketEndpoint="{websocket_endpoint_path}";')

0 commit comments

Comments
 (0)