What is causing this error?
https://glistening-bombolone-928636.netlify.app/
After you start removing selected filters an error pops up in the console about line of code that removes them, but everything works.
I ignored it since it works, but it is bugging me and would like to know how to fix it.
Cheers!
4 Replies
can you try, instead of
@MarkBoots So since the filter is consisted of filter name and button, and I'm targeting button here, it only removes button. But If I add
it works
ah okay, i overlooked the difference in
removeFilter[i]
and selectedFilterUnit[i]
. thought it was the same element
btw, with this it is easy to make a named callback function (makes it a lot cleaner so you don't have a huge codeblock)
Roger!
Thanks a lot!