-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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(cluster): reorder defaults arguments to prioritize user options #889
Conversation
Defaults works the way its intended. From leftmost argument having the highest priority to the rightmost having the least |
@AVVS I'm not sure what you meant to express. Yes, defaults takes the value of a given key from the first argument that defines that key. This particular usage of defaults prioritized the I've just reordered the arguments so that the priority is:
Are you suggesting that the existing behavior is correct and the user should not be able to set any options inherited from |
@jschweik thanks for the details, I did miss that first argument as being passed from the commander, assumed it was from the user input. The change does look good to me now that I've dug into it a little bit more |
## [4.10.3](v4.10.2...v4.10.3) (2019-06-08) ### Bug Fixes * **cluster:** reorder defaults arguments to prioritize user options ([#889](#889)) ([8da8d78](8da8d78))
🎉 This PR is included in version 4.10.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Good caught! Btw, is there any particular reasons the former |
@luin , no the old assignment should have been removed. I originally commented it out and wrote the new line, so that I could confirm the new test worked as expected, and I accidentally uncommented the old line instead of deleting it. 😞 |
## [4.10.3](redis/ioredis@v4.10.2...v4.10.3) (2019-06-08) ### Bug Fixes * **cluster:** reorder defaults arguments to prioritize user options ([#889](redis/ioredis#889)) ([8da8d78](redis/ioredis@8da8d78))
Addresses the issue noted in #883 (comment)