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

Add type def file and fix bug in getElement #59

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NickAnthony
Copy link

We need the type def so that typescript projects don't complain about lack of types.

getElement assumes that sign.element is always an index, but we are in fact re-assigning it to be the element string itself. So before we assign it, we check for validity. npm run test actually fails because of this.

Test: npm run test

sing.element can either be the element string or the index of the
element in the elementsData array.

This change ensures that we only set the sign.element if it exists in
the elementsData array.

Test: npm run test
@NickAnthony
Copy link
Author

@helmasaur could you take a look at this PR?

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

Successfully merging this pull request may close these issues.

1 participant