summaryrefslogtreecommitdiff
path: root/source/features/view-markdown-source.tsx
diff options
context:
space:
mode:
authorGravatar Federico Brigante <github@bfred.it> 2019-08-31 01:26:28 +0700
committerGravatar GitHub <noreply@github.com> 2019-08-31 01:26:28 +0700
commit8d0393542bd712d7bb7f93874118dedd07b62c7b (patch)
tree0a139195466ba76bf5abdd6cbb979e55dcf3322a /source/features/view-markdown-source.tsx
parent0ca864af6da9cac9f503e4abd0c58b60fbe1abc6 (diff)
downloadrefined-github-8d0393542bd712d7bb7f93874118dedd07b62c7b.tar.gz
refined-github-8d0393542bd712d7bb7f93874118dedd07b62c7b.tar.zst
refined-github-8d0393542bd712d7bb7f93874118dedd07b62c7b.zip
Update dependencies and lint (#2391)19.8.31
Diffstat (limited to 'source/features/view-markdown-source.tsx')
-rw-r--r--source/features/view-markdown-source.tsx4
1 files changed, 2 insertions, 2 deletions
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;