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

fix unused variable prevent string enforcement #385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pubkey
Copy link

@pubkey pubkey commented Apr 28, 2020

There was the call const csv = csvString.toString(); which enforces the input of fromString() to be a string. But the variable csv was never used which is why I got the error csvString.substr is not a function deep in a subdependency.

I changed the code to actually use the string enforcement in the later calls.

What do you think about adding a tslint to the CI to prevent these kind of bugs in the future?

@coveralls
Copy link

coveralls commented Apr 28, 2020

Pull Request Test Coverage Report for Build 235

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 95.421%

Totals Coverage Status
Change from base Build 234: 0.07%
Covered Lines: 664
Relevant Lines: 680

💛 - Coveralls

@pubkey
Copy link
Author

pubkey commented Apr 28, 2020

Maybe it would be better to directly throw if no string was given

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.

None yet

2 participants