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

Variable curve is defined twice, in two different scopes #19

Closed
kunnapool opened this issue Mar 18, 2022 · 1 comment
Closed

Variable curve is defined twice, in two different scopes #19

kunnapool opened this issue Mar 18, 2022 · 1 comment

Comments

@kunnapool
Copy link
Owner

kunnapool commented Mar 18, 2022

In this file lib/elliptic/curves.js, variable curve is defined twice, in two different scopes; once in the global scope, and then in the function defineCurve. This is can be very problematic, especially as the codebase (defineCurve in particular) grows bigger and more people work on it - one could confuse the two scopes and cause bugs that would be very hard to track down.

Even though it is syntactically correct, this should be resolved.
Code smell

@kunnapool
Copy link
Owner Author

Fixed in #32

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