Mixitup Multi-dimension breaks when field is empty

@sabanna Thanks so much for the tutorial, it’s amazing! Regarding Multi-dimension CMS filtering: I’m noticing that when I add to the “mix” items a field that some of the collection items have left blank, it breaks the plugin. Any way to solve this? Thank you!

I think it might be that we have to adjust the code below in a case where there is no inner text:

  // Creating dynamic elements classes from its categories:
  var catArray = document.querySelectorAll('.w-dyn-item .categ');
  catArray.forEach( function(elem) {
    var text = elem.innerText || elem.innerContent;
    var className = conv(text);
    elem.parentElement.classList.add(className);
  });

http://chart-7b7fc3.webflow.io/page

https://preview.webflow.com/preview/chart-7b7fc3?preview=05d03acfb8cf2ea7c9dfd8e8673f0bab

Hello, @simmyd!

Thanks for reaching out! Did you try code changes that I suggested for take care of such situation?

[TUTORIAL] MixItUp filtering plugin with Dynamic content - #39 by sabanna

That worked @sabanna . Thanks a million. Greatly appreciated