From dead16199fbcc4da306ef148ec4ffb4f13122829 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 8 Feb 2018 00:50:26 +0200 Subject: [PATCH] fix: crash in MarkdownRenderer on non-string --- src/services/MarkdownRenderer.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/services/MarkdownRenderer.ts b/src/services/MarkdownRenderer.ts index 588ca33308..07e2217ff5 100644 --- a/src/services/MarkdownRenderer.ts +++ b/src/services/MarkdownRenderer.ts @@ -129,9 +129,7 @@ export class MarkdownRenderer { md.renderer.rules.heading_close = this.headingCloseRule; } - const text = rawText; - - const res = md.render(text); + const res = md.render(rawText.toString()); if (!raw) { this.restoreOrigRules();