openedx / openedx/frontend-app-discussions
Error during creating a post from new discussion MFE sidebar
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Description
From logs, I was able to find that a forEach.. function is causing the issue in discussions/posts/data/hooks.js, where post.pinned is causing issue as initially it is getting an undefined post.
https://github.com/openedx/frontend-app-discussions/blob/58aa512f47957063f300095c516cbf4b031c7d6d/src/discussions/posts/data/hooks.js#L14
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/discussions/posts/data/hooks.js line 14 and reproduce creating a post from the new discussion MFE sidebar. Trace the forEach call and the initial undefined post; done means the post creation flow no longer errors when that value is encountered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100