Skip to content

TypeError: Cannot read properties of undefined (reading 'temperature_2m') when editing weather location inside message bubble (Washington DC fails) #1339

@ramo-dev

Description

@ramo-dev

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

  1. Start a new chat.
  2. Click the suggested prompt: “What is the weather in San Francisco?”
  3. Wait for the weather UI to render.
  4. 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.
Image 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

  • The link above only shows the result of the error, not how to reproduce it.

  • Browser: Brave Browser

  • Device: Mac

    Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions