microsoft / microsoft/BotFramework-WebChat

[Notification] JavaScript error thrown when `message` not set for notification

Open
#3,021 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

backlog bug front-burner needs-scheduling needs-team-attention p1 size-s
Dominant language
HTML
Stars
1.8k
Forks
1.6k
Avg merge
22h 58m
Merged PRs (30d)
2

Description

Screenshots

image

Version

4.8.0

Describe the bug

When a notification without message field is dispatched to WEB_CHAT/SET_NOTIFICATION action, it should not throw an error.

Steps to reproduce

When the following code is added, since it don't have message field, it throw an error.

store.dispatch({
  type: 'WEB_CHAT/SET_NOTIFICATION',
  payload: {
    id: 'hello-world',
    level: 'success'
  }
});

Expected behavior

It should show an empty box without error.

Additional context

[Bug]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by dispatching the shown WEB_CHAT/SET_NOTIFICATION payload and trace the notification handling and rendering path. Confirm that a notification without message displays an empty box without throwing a JavaScript error; the issue does not name a file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.