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

Potential issue in error case management #1

Open
vigourouxc opened this issue Jan 30, 2019 · 0 comments
Open

Potential issue in error case management #1

vigourouxc opened this issue Jan 30, 2019 · 0 comments

Comments

@vigourouxc
Copy link

Hi,

It seems that this line of code is broken:

elements.length + " != " + this.pRings.length + ")");

in case the previous statement is false:

if (value.length === this.pRings.length) {
elements = value;
} else {
throw Error("Wrong number of elements! (" +
elements.length + " != " + this.pRings.length + ")");

The elements variable is not yet defined, so elements.length would result in a TypeError.

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