TypeError: Cannot read properties of undefined (reading 'temperature_2m') when editing weather location inside message bubble (Washington DC fails)
Description
When using the weather preset prompt, editing the location directly inside the rendered weather message (instead of sending a new message) causes a runtime error. This issue appears to occur specifically with “Washington DC”, while most other locations retrieve weather data correctly.
An image of the error is attached at the bottom
The public chat link shows the error state but does not reproduce it:
https://demo.chat-sdk.dev/chat/cadb1b83-0120-4c01-ba12-27ceb2f3c15b
Steps to Reproduce
- Start a new chat.
- Click the suggested prompt: “What is the weather in San Francisco?”
- Wait for the weather UI to render.
- In the existing weather message bubble, edit the location text to: “Washington DC” (do not send a new message or start a new conversation) as per the image below.

5. The UI attempts to update and throws an error.
Expected Behavior
Editing the location directly inside the existing weather result should re-fetch weather data or gracefully update the UI without errors.
Actual Behavior
A console error appears and the UI fails to update:
Uncaught TypeError: Cannot read properties of undefined (reading 'temperature_2m')
Additionally:
- The issue reliably occurs with “Washington DC”.
- Other locations (cities or countries) appear to work normally.
Additional Context