microlinkhq / microlinkhq/react-json-view

Bug: Property Set to Undefined On Type Change

Open
#83 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
417
Forks
68
Avg merge
4h 22m
Merged PRs (30d)
8

Description

I am allowing edit for specific attributes of my JSON object. If an attribute is not editable, the onEdit callback returns false.

The following steps trigger this uncaught error:
TypeError: Cannot read properties of undefined (reading '0')

  1. Click edit on attribute which is not editable
  2. Click submit edit. Validation Error toast message is displayed
  3. Repeat 1-2

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 reproducing the editable-attribute flow described in the issue: reject an edit through onEdit, submit it, then repeat the sequence. Trace the state used during the type change and validation-error path. Done means repeated attempts no longer produce the uncaught undefined-property TypeError while the validation error toast still appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.