Skip to content

Commit

Permalink
Fixed a minor bug when a page would raise an exception the frame woul…
Browse files Browse the repository at this point in the history
…d not be cleaned up after meaning the following request might get two pages mashed togeather
  • Loading branch information
Declow committed Oct 16, 2024
1 parent 1029914 commit b1d0c46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions uiwiz/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def decorator(func: Callable, *args, **kwargs) -> Callable:

@functools.wraps(func)
async def decorated(*dec_args, **dec_kwargs) -> Response:
Frame.get_stack().del_stack()
# Create frame before function is called
Frame.get_stack()
Element().classes("flex flex-col min-h-screen h-full")
Expand Down Expand Up @@ -200,6 +201,7 @@ def decorator(func: Callable) -> Callable:

@functools.wraps(func)
async def decorated(*dec_args, **dec_kwargs) -> Response:
Frame.get_stack().del_stack()
# Create frame before function is called
Frame.get_stack()
response = dec_kwargs["response"]
Expand Down

0 comments on commit b1d0c46

Please sign in to comment.