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

"Disperse nodes" is not working for some schemes #102

Open
theKashey opened this issue Jul 7, 2024 · 3 comments
Open

"Disperse nodes" is not working for some schemes #102

theKashey opened this issue Jul 7, 2024 · 3 comments

Comments

@theKashey
Copy link

👋 Thanks for the great tool.

I've tried to visualize a medium-sized schema and "disperse nodes" function failed with Cannot read properties of undefined (reading 'length') here -

acc[0] < curr.name.length ? curr.name.length : acc[0],

Incoming data shape -
image

If I update letters[i]! to something like letters[i] || "" it solves the problem and everything works great

name: letters[i]!,

Not sure if that's the right way to address this issue.

Anyways, I've corrected it in my local version and am not blocked. Feel free to handle this issue when and as you prefer.

@Ovyerus
Copy link
Owner

Ovyerus commented Jul 26, 2024

I implemented your change in be302d0!

If possible, would you be able to share the schema/a cut down example that caused this, to see if can understand the root cause and possibly come up with a better solution?

@theKashey
Copy link
Author

Check your mail, there should be a link to a gist with a problematic scheme.

@Ovyerus
Copy link
Owner

Ovyerus commented Jul 27, 2024

Cheers, got it. I'll see what I can do about this.

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

2 participants