From 8d0393542bd712d7bb7f93874118dedd07b62c7b Mon Sep 17 00:00:00 2001
From: Federico Brigante <github@bfred.it>
Date: Sat, 31 Aug 2019 01:26:28 +0700
Subject: Update dependencies and lint (#2391)

---
 source/features/view-markdown-source.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'source/features/view-markdown-source.tsx')

diff --git a/source/features/view-markdown-source.tsx b/source/features/view-markdown-source.tsx
index 79501013..39a0d407 100644
--- a/source/features/view-markdown-source.tsx
+++ b/source/features/view-markdown-source.tsx
@@ -39,7 +39,7 @@ async function showSource(): Promise<void> {
 	sourceButton.disabled = true;
 
 	const source = btnBodyMap.get(sourceButton) || fetchSource();
-	const rendered = btnBodyMap.get(renderedButton) as Element || select('.blob.instapaper_body')!;
+	const rendered = await btnBodyMap.get(renderedButton) || select('.blob.instapaper_body')!;
 
 	btnBodyMap.set(sourceButton, source);
 	btnBodyMap.set(renderedButton, rendered);
@@ -61,7 +61,7 @@ async function showRendered(): Promise<void> {
 
 	renderedButton.disabled = true;
 
-	(await btnBodyMap.get(sourceButton))!.replaceWith(btnBodyMap.get(renderedButton) as Element);
+	(await btnBodyMap.get(sourceButton))!.replaceWith(await btnBodyMap.get(renderedButton)!);
 
 	renderedButton.disabled = false;
 
-- 
cgit v1.2.3

