Skip to content

Commit

Permalink
Fallback to styleElement.text for IE9.
Browse files Browse the repository at this point in the history
IE9 doesn't provide a `textContent` property on this object.  This caused
errors when trying to import SVG files with `<style>` inside them.
  • Loading branch information
toddbc committed Jan 26, 2016
1 parent 100d22a commit 3410451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@

// very crude parsing of style contents
for (var i = 0, len = styles.length; i < len; i++) {
var styleContents = styles[i].textContent;
var styleContents = styles[i].textContent || styles[i].text;

// remove comments
styleContents = styleContents.replace(/\/\*[\s\S]*?\*\//g, '');
Expand Down

0 comments on commit 3410451

Please sign in to comment.