nodeshift / opossum

Node.js circuit breaker - fails fast ⚡️
https://nodeshift.dev/opossum/
Apache License 2.0
1.33k stars 107 forks source link

fix: fix bug where options couldn't be set to zero. #825

Closed lholmquist closed 1 year ago

lholmquist commented 1 year ago

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

lholmquist commented 1 year ago

@ollelindeman this look good?

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 6408373217


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

💛 - Coveralls
ollelindeman commented 1 year ago

@ollelindeman this look good?

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