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

UI: Adds a default view helper for providing a default value #4650

Merged
merged 1 commit into from
Sep 12, 2018

Conversation

johncowen
Copy link
Contributor

If the first value passed to the helper is an empty string or undefined then return the second value.

This is then used for printing Service.Addresses or Node.Addresses, based on whether the former has a value.

Fixes: #4579

If the first value passed to the helper is an empty string or undefined
then return the second value
@johncowen johncowen requested a review from a team September 11, 2018 11:28
@johncowen johncowen added the theme/ui Anything related to the UI label Sep 11, 2018
@johncowen johncowen requested a review from pearkes September 11, 2018 18:07
@johncowen johncowen added this to the 1.2.3 milestone Sep 12, 2018
@pearkes pearkes modified the milestones: 1.2.3, 1.3.0 Sep 12, 2018
Copy link
Contributor

@pearkes pearkes left a comment

Choose a reason for hiding this comment

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

I don't see anything wrong with this but noting that the same could be accomplished with an inline if/else where if will not match on '' or undefined.

@johncowen johncowen merged commit 0757a08 into master Sep 12, 2018
@johncowen johncowen deleted the feature/ui-default-helper branch September 12, 2018 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants