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.
https://github.com/drupal-pattern-lab/bem-twig-extension/blob/c772316bb6121823dcae157abfd1c173441e121d/bem.function.php#L19
If we pass an array of modifer like
bem(base_element, ['mod1', 'mod2', ''])
returnsbase_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.