Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'rbRed' of null (line 316) #41

Open
nsursock opened this issue Aug 9, 2021 · 0 comments
Open

Comments

@nsursock
Copy link

nsursock commented Aug 9, 2021

My implementation works sometimes but since I want to do Lloyd's relaxation, I really need the compute method to work all the time. I copied the code in the demo and I was expecting to have good results. But no matter how hard I try or the input, I still get this error Cannot read property 'rbRed' of null. Sometimes it's Cannot read property 'rbLeft' of null.

I'm using random numbers to generate the sites. And it seems the more sites I have, the less likely I am to have a working diagram. Can you please tell me if there's a fix? I already tried replacing the sibling var with sibling?: that way I'm checking if the var is null before referencing a property. But I got another error.

Many thanks.

EDIT: this bug doesn't happen when I use the code with Node. It only happens when I generate the map in a browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant