From 617e027f1273783f697331211aa6052baa5f6746 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 24 May 2017 15:50:35 +0200 Subject: [PATCH] catch markdown preview errors --- www/code/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/code/main.js b/www/code/main.js index 9cb3cae10..788ddddcf 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -112,7 +112,9 @@ define([ var drawPreview = Cryptpad.throttle(function () { if (CodeMirror.highlightMode !== 'markdown') { return; } - DiffMd.apply(DiffMd.render(editor.getValue()), $preview); + try { + DiffMd.apply(DiffMd.render(editor.getValue()), $preview); + } catch (e) { console.error(e); } }, 150); var onLocal = config.onLocal = function () {