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

Modifier doesn't check if modifier is empty! #13

Open
VishalKumarSahu opened this issue May 4, 2019 · 1 comment
Open

Modifier doesn't check if modifier is empty! #13

VishalKumarSahu opened this issue May 4, 2019 · 1 comment

Comments

@VishalKumarSahu
Copy link

VishalKumarSahu commented May 4, 2019

foreach ($modifiers as $modifier) {

If we pass an array of modifer like
bem(base_element, ['mod1', 'mod2', ''])
returns
base_element--mod1 base_element--mod2 base_element--
where last part is undesirable, since inside twig some variable may be empty. So there should be some check for if the value is there or it is empty.

@jeff-cardwell
Copy link

Whoops. I didn't see this issue before I created PR #15. It should fix this.

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