jakezatecky/react-checkbox-tree

TypeError: p is undefined node_modules\react-checkbox-tree\lib\index.browser.js

rm-rf42 opened this issue · 1 comments

Describe the bug
node_modules\react-checkbox-tree\lib\index.browser.js appears to be crashing due to "p is undefined" This happens when I attempt to push data to the nodes object. Hardcoded it works, even taking my results from console.log and hard coding it as a new node object works.

Whats strange is if I let the page load while commenting out the part that pushes to the object, and then uncomment. It works perfect. Is there anyway I can troubleshoot this? I am not sure what the variable "p" is that it is referencing.

Reproduction steps
I am not able to reproduce this in the sandbox.

Expected behavior
I am attempting to dynamically add to the nodes object from data I am getting from another source. I can see my new node object when I console.log and it looks correct. In fact when I hard code that it works perfectly.

Screenshots
image

I am modifying the nodes const in a SSR function now instead and this seems to solve this issue.