Log errors when trying to load a `markdown-it-bunlde.js`.

This commit is contained in:
Guo Xiang Tan 2017-07-17 11:21:57 +09:00
parent 238d83c6e6
commit c5401a0927
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ export function cook(text, options) {
export function cookAsync(text, options) { export function cookAsync(text, options) {
if (Discourse.MarkdownItURL) { if (Discourse.MarkdownItURL) {
return loadScript(Discourse.MarkdownItURL) return loadScript(Discourse.MarkdownItURL)
.then(()=>cook(text, options)); .then(()=>cook(text, options))
.catch(e => Ember.Logger.error(e));
} else { } else {
return Ember.RSVP.Promise.resolve(cook(text)); return Ember.RSVP.Promise.resolve(cook(text));
} }