From c2b911d73aac2c0e6f01724f173e12ba2ed9738c Mon Sep 17 00:00:00 2001 From: infinite-persistence <64950861+infinite-persistence@users.noreply.github.com> Date: Wed, 29 Jun 2022 20:25:21 +0800 Subject: [PATCH] Workaround for markdown crash with Google Translate (#1773) ## Issue Depending on what the markdown content was, React crashes when unmounting the component if Google Translate is active. ## Change It seems like the content is too dynamic to apply the same workaround used in 1772 for FileReactions (someone else can take a stab). Until we have a better solution, just make the markdown component (posts, comments, file description, etc.) not participate in Chrome-level translations. It's not a good solution from a user standpoint, but it at least it doesn't crash. --- ui/component/common/markdown-preview.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/component/common/markdown-preview.jsx b/ui/component/common/markdown-preview.jsx index 71b2d974d..e29379278 100644 --- a/ui/component/common/markdown-preview.jsx +++ b/ui/component/common/markdown-preview.jsx @@ -253,7 +253,7 @@ export default React.memo(function MarkdownPreview(props: Markdow } return ( -
+
{ remark() .use(remarkAttr, remarkAttrOpts)