From c5401a0927c75d89a1f224b6616a514566aa5f74 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 17 Jul 2017 11:21:57 +0900 Subject: [PATCH] Log errors when trying to load a `markdown-it-bunlde.js`. --- app/assets/javascripts/discourse/lib/text.js.es6 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/text.js.es6 b/app/assets/javascripts/discourse/lib/text.js.es6 index 476ca3ea9ec..970bbbae5ae 100644 --- a/app/assets/javascripts/discourse/lib/text.js.es6 +++ b/app/assets/javascripts/discourse/lib/text.js.es6 @@ -26,7 +26,8 @@ export function cook(text, options) { export function cookAsync(text, options) { if (Discourse.MarkdownItURL) { return loadScript(Discourse.MarkdownItURL) - .then(()=>cook(text, options)); + .then(()=>cook(text, options)) + .catch(e => Ember.Logger.error(e)); } else { return Ember.RSVP.Promise.resolve(cook(text)); }