diff options
author | Phil Hughes <me@iamphill.com> | 2017-03-20 14:44:07 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-03-23 10:52:55 +0000 |
commit | 313258fa423f9c3a03e793e2a7bc8686d0757e91 (patch) | |
tree | 3660d7a115bb2d55c6b610135f80c18f82db9d4e /app/assets/javascripts | |
parent | 33f26de56bca2c5c2d6a4da29ed2217b8abf1710 (diff) | |
download | gitlab-ce-313258fa423f9c3a03e793e2a7bc8686d0757e91.tar.gz |
Stops errors in the rendering breaking the page
Fixed some output types
[ci skip]
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/blob/notebook_viewer.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/app/assets/javascripts/blob/notebook_viewer.js b/app/assets/javascripts/blob/notebook_viewer.js index 057afc9b2e5..4bd80393d17 100644 --- a/app/assets/javascripts/blob/notebook_viewer.js +++ b/app/assets/javascripts/blob/notebook_viewer.js @@ -5,6 +5,10 @@ import NotebookLab from 'vendor/notebooklab'; Vue.use(VueResource); Vue.use(NotebookLab); +Vue.config.errorHandler = (err) => { + console.log(err); +} + $(() => { const el = document.getElementById('js-notebook-viewer'); @@ -12,6 +16,7 @@ $(() => { el, data() { return { + error: false, loading: true, json: {}, }; @@ -28,14 +33,11 @@ $(() => { </div> `, mounted() { - $.get(gon.katex_css_url, () => { - const css = $('<link>', { - rel: 'stylesheet', - type: 'text/css', - href: gon.katex_css_url, - }); - css.appendTo('head'); - }); + $('<link>', { + rel: 'stylesheet', + type: 'text/css', + href: gon.katex_css_url, + }).appendTo('head'); $.getScript(gon.katex_js_url, () => { this.$http.get(el.dataset.endpoint) |