Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

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

@nsursock

Description

@nsursock

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions