catch markdown preview errors

This commit is contained in:
ansuz
2017-05-24 15:50:35 +02:00
parent bc26f7fc4e
commit 617e027f12

View File

@@ -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 () {