JetBrains / svg-sprite-loader

Webpack loader for creating SVG sprites.
MIT License
2.01k stars 272 forks source link

ie edge does not support the method "querySelectorAll" of symbolNode #415

Open lt1129 opened 3 years ago

lt1129 commented 3 years ago

Bug info: IE edge does not support the method "querySelectorAll" of symbolNode, so there is a js error in IE edge.

My fix suggestion: add this judgement: if (typeof node.querySelectorAll === 'function') {

var evalStylesIEWorkaround = function (node) { var updatedNodes = [];

// Maybe add this judgement,you can fix the bug
if (typeof node.querySelectorAll === 'function') {
  arrayFrom(node.querySelectorAll('style'))
    .forEach(function (style) {
      style.textContent += '';
      updatedNodes.push(style);
    });
}

return updatedNodes;

};

Please tell us about your environment:

xcchcaptain commented 3 years ago

I got the same problem at webpack 3.6.9 svg-sprite-loader:4.1.3 OS type: windows 10 browser:IE11 ,IE edge