Skip to content

Commit

Permalink
Release: Fix SVG rendering bug (#4761)
Browse files Browse the repository at this point in the history
* fix

* add linear ticket
  • Loading branch information
benisgold authored and Ibrahim Taveras committed Mar 31, 2023
1 parent 7ee9e61 commit 2bd173d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/svg/SvgImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ class SvgImage extends Component {
const res = await fetch(uri);
const text = await res.text();
if (text.toLowerCase().indexOf('<svg') !== -1) {
// TODO APP-526 more thorough investigatation into if/why foreignObject images aren't supported
if (text.match(/<foreignObject[\s\S]*?<\/foreignObject>/)) {
logger.log('foreignObject tag not supported', { text, uri });
// return w/o error so we can fallback to png
return;
}
this.mounted &&
this.setState({ fetchingUrl: uri, svgContent: text });
} else {
Expand Down

0 comments on commit 2bd173d

Please sign in to comment.