Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Improve truthy & falsey handling of options which could be set to 0 #1143

Merged
merged 1 commit into from
Jan 16, 2018

Conversation

defkev
Copy link
Contributor

@defkev defkev commented Jan 15, 2018

Fixes #1141

@@ -460,9 +460,9 @@ module.exports = function container (get, set, clear) {
if (s.product.max_size && Number(size) > Number(s.product.max_size)) {
size = s.product.max_size
}
if (s.buy_order && so.max_slippage_pct) {
if (s.buy_order && so.max_slippage_pct != null) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be !== null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short version of !== null || !== undefined

@DeviaVir DeviaVir merged commit c173642 into DeviaVir:unstable Jan 16, 2018
@defkev defkev deleted the pr-truthy-falsey branch February 15, 2018 17:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants