From 2bd173d51be2a158c5ddddb87b0e7963d00c2271 Mon Sep 17 00:00:00 2001 From: Ben Goldberg Date: Fri, 31 Mar 2023 11:56:45 -0400 Subject: [PATCH] Release: Fix SVG rendering bug (#4761) * fix * add linear ticket --- src/components/svg/SvgImage.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/svg/SvgImage.js b/src/components/svg/SvgImage.js index 3188f270b4e..4ad5cf18b22 100644 --- a/src/components/svg/SvgImage.js +++ b/src/components/svg/SvgImage.js @@ -91,6 +91,12 @@ class SvgImage extends Component { const res = await fetch(uri); const text = await res.text(); if (text.toLowerCase().indexOf('/)) { + 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 {