-
Notifications
You must be signed in to change notification settings - Fork 3k
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(pluck): operator breaks with null/undefined inputs. #5524
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I don't think the nullish coalescing operator should be used here.
…ing converted to undefined
@cartant , is there a process to PR getting merged after approval? (Sorry if this is already documented somewhere, I could not find it) |
PRs that update actual library code - i.e. not just tests or docs - need to be approved and merged by Ben. |
* test(pluck): add failing test case for using null value. * fix(pluck): check for null/undefined object before attempting to access prop * Remove null coalescing when checking values to prevent null values being converted to undefined
Merged also into 6.x, although with a slight alteration, as we don't compile with TS 3.9 there. |
Description:
Add a fix to prevent the pluck operator from breaking on null or undefined inputs.
Related issue (if exists):
#5505