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

[Feature] Blade-like shortcut "or" for echoing data if it exists #53

Closed
desvandev opened this issue Jul 25, 2018 · 2 comments
Closed

[Feature] Blade-like shortcut "or" for echoing data if it exists #53

desvandev opened this issue Jul 25, 2018 · 2 comments
Assignees

Comments

@desvandev
Copy link

Instead of using a custom "global" or writing:

{{ my_data !== undefined || my_data !== '' ? my_data : 'nothing' }}

It will be really handy/cleaner to have a shortcut like:

{{ my_data or 'nothing' }}
@thetutlage thetutlage self-assigned this Jul 25, 2018
@thetutlage
Copy link
Member

Use the or operator.

{{ my_data || 'nothing' }}

@thetutlage
Copy link
Member

Closing since not actionable

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

No branches or pull requests

2 participants