Skip to content

Commit

Permalink
fix mathjax.hub not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
zema1 committed Dec 23, 2017
1 parent c81d8b1 commit a416ada
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/pages/oj/views/general/Announcements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@
this.announcement = announcement
this.listVisible = false
this.$nextTick(() => {
window.MathJax.Hub.Queue(['Typeset', window.MathJax.Hub, 'problem-content'])
if (window.MathJax) {
window.MathJax.Hub.Queue(['Typeset', window.MathJax.Hub, 'problem-content'])
}
})
},
goBack () {
Expand Down
4 changes: 3 additions & 1 deletion src/pages/oj/views/problem/Problem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@
api[func](this.problemID, this.contestID).then(res => {
this.$Loading.finish()
this.$nextTick(() => {
window.MathJax.Hub.Queue(['Typeset', window.MathJax.Hub, 'problem-content'])
if (window.MathJax) {
window.MathJax.Hub.Queue(['Typeset', window.MathJax.Hub, 'problem-content'])
}
})
let problem = res.data.data
this.changeDomTitle({title: problem.title})
Expand Down

0 comments on commit a416ada

Please sign in to comment.