Browse Source

don't repeat UI updates from HTTP response (fixes #2926)

Falko Schindler 1 year ago
parent
commit
64eb3aeaff
1 changed files with 1 additions and 0 deletions
  1. 1 0
      nicegui/client.py

+ 1 - 0
nicegui/client.py

@@ -115,6 +115,7 @@ class Client:
 
     def build_response(self, request: Request, status_code: int = 200) -> Response:
         """Build a FastAPI response for the client."""
+        self.outbox.updates.clear()
         prefix = request.headers.get('X-Forwarded-Prefix', request.scope.get('root_path', ''))
         elements = json.dumps({
             id: element._to_dict() for id, element in self.elements.items()  # pylint: disable=protected-access