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

Change nil check to use safe navigation operator #3293

Merged

Conversation

jacobherrington
Copy link
Contributor

@jacobherrington jacobherrington commented Aug 3, 2019

Description

This change is fairly subjective, but it does remove a duplicate method
call and in my opinion clarifies the intention of the code

This replaces a boolean && with the safe navigation operator.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)

Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

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

@jacobherrington LGTM, thank you!

@jacobherrington jacobherrington changed the title Refactor total_on_hand_for api helper method Change nil check to use safe navigation operator Aug 8, 2019
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

@jacobherrington jacobherrington merged commit 43c8921 into solidusio:master Aug 8, 2019
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.

None yet

4 participants