react-json-tree crashes on sparse array with 51+ elements
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start in packages/react-json-tree/src/JSONNestedNode.tsx at isRange(), then read the collectionLimit default in packages/react-json-tree/src/index.tsx. Reproduce the crash with the sparse-array example or the linked CodeSandbox. Done means JSONTree renders a sparse array with more than 50 elements without throwing.
Written by the indexing model from the issue text.
Description
If you try to show a sparse array with 51 or more elements, JSONTree crashes with Cannot read properties of undefined (reading 'to') from isRange()
This happens any time a sparse array has more than collectionLimit items, which is 50 by default.
let sparseArrayBroken: string[] = [];
sparseArrayBroken[50] = "this causes a crash";
<JSONTree data={sparseArrayBroken} />
Reproduction here: https://codesandbox.io/p/sandbox/ns6q5j
https://github.com/user-attachments/assets/9f7bce8f-33ea-4aeb-9db6-4b6ad8fa2f7c
- Dominant language
- TypeScript
- Stars
- 14.4k
- Forks
- 1.2k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 20
Contributor guide
No contributing guide indexed for this repository
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.
More from reduxjs/redux-devtools
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
reduxjs/redux-devtools#2091 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
reduxjs/redux-devtools#2075 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
reduxjs/redux-devtools#2053 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
reduxjs/redux-devtools#2006 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
reduxjs/redux-devtools#1993 · 1 reaction ·
All issues in reduxjs/redux-devtools
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·