I am trying to implement Google tag manager in my React Web App but facing an issue due the circular structure of SVGSVGElement
I have added some custom SVG icons in my component using
import {ReactComponent as TrashIcon} from 'images/trashcan.svg';
But whenever I click on this icon, the GTM script throws the error above and does not track further events. It's not efficient to rewrite every icon that I embed to img tag and not an appropriate approach especially in case of default MUI icons.