testing-library / testing-library/user-event
Error: Diplayed value in UI can be `null`
Open
Beginner friendly
Nobody has claimed this yet.
bug
needs assessment
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 258
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction example
null
Prerequisites
Setting a value to null programmatically.
Expected behavior
Nothing happens
Actual behavior
TypeError: right hand side of 'in' should be an object, got null
Since EcmaScript returns object on typeof null this function is not safe
User-event version
14.6.1
Environment
No response
Additional context
No response
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 in src/document/UI.ts at line 24 and reproduce the issue by setting a value to null programmatically. Check the null-handling path and verify that the operation produces no TypeError and nothing happens, as described by the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100