From 42ce2dffb59dff541232ed60fcddb8ece9a1e91c Mon Sep 17 00:00:00 2001
From: yakov116 <16872793+yakov116@users.noreply.github.com>
Date: Tue, 20 Oct 2020 21:12:46 -0400
Subject: Fetch widget for `view-markdown-source` instead of maintaining a copy
 of it (#3670)

Co-authored-by: Federico <me@fregante.com>
---
 source/features/embed-gist-inline.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'source/features/embed-gist-inline.tsx')

diff --git a/source/features/embed-gist-inline.tsx b/source/features/embed-gist-inline.tsx
index 0bdb0e63..d6a83b1e 100644
--- a/source/features/embed-gist-inline.tsx
+++ b/source/features/embed-gist-inline.tsx
@@ -22,7 +22,7 @@ async function embedGist(link: HTMLAnchorElement): Promise<void> {
 		// Get the gist via background.js due to CORB policies introduced in Chrome 73
 		const gistData = await browser.runtime.sendMessage({request: `${link.href}.json`});
 
-		const files = domify.one(gistData.div)!;
+		const files = domify.one(JSON.parse(gistData).div)!;
 		const fileCount = files.children.length;
 
 		if (fileCount > 1) {
-- 
cgit v1.2.3

