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: fix bug where options couldn't be set to zero. #825

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

lholmquist
Copy link
Member

when setting things like resetTimeout and errorThresholdPercentage to 0, the default value was being used since zero is a false-y value. Adding the nullish coalesce operator (??) fixes it

fixes #824

when setting things like resetTimeout and errorThresholdPercentage to 0, the default value was being used.

fixes nodeshift#824
@lholmquist
Copy link
Member Author

@ollelindeman this look good?

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6408373217

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.006%) to 98.325%

Totals Coverage Status
Change from base Build 6326893293: -0.006%
Covered Lines: 373
Relevant Lines: 374

💛 - Coveralls

@lholmquist lholmquist requested a review from a team October 4, 2023 15:50
@ollelindeman
Copy link

@ollelindeman this look good?

Look good to me! Thanks for the fast reply and action! 👍 🚀

@lholmquist lholmquist merged commit e6b3b77 into nodeshift:main Oct 5, 2023
5 checks passed
@lholmquist lholmquist deleted the fix_setting_to_zero_bugs branch October 5, 2023 13:21
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.

Setting some options to 0 doesn't work (it still uses defaults)
3 participants