nusmodifications / nusmodifications/nusmods
Module search results sometimes updates twice
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 689
- Forks
- 364
- Avg merge
- 7h 5m
- Merged PRs (30d)
- 14
Description
Describe the bug
When the search term is changed (usually through removing a single character), the search result changes twice
To Reproduce
Steps to reproduce the behavior:
- Go to https://nusmods.com/modules?q=CS
- Delete the letter S from the query
- Notice one set of results appear briefly, then another
Expected behavior
Just one render should happen
Screenshots

Reproduced on Firefox latest beta. Probably has something to do with the delayed rendering magic we're doing.
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 the module search page shown in the reproduction URL and investigate the delayed rendering behavior triggered when the query changes. Reproduce it by deleting S from CS, then confirm the fix by verifying that only one set of results appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100