diff options
Diffstat (limited to 'app/assets/javascripts/syntax_highlight.js')
-rw-r--r-- | app/assets/javascripts/syntax_highlight.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/syntax_highlight.js b/app/assets/javascripts/syntax_highlight.js index cb2bf24abc7..065e1080897 100644 --- a/app/assets/javascripts/syntax_highlight.js +++ b/app/assets/javascripts/syntax_highlight.js @@ -15,6 +15,10 @@ export default function syntaxHighlight($els = null) { const els = $els.get ? $els.get() : $els; const handler = (el) => { + if (el.classList === undefined) { + return el; + } + if (el.classList.contains('js-syntax-highlight')) { // Given the element itself, apply highlighting return el.classList.add(gon.user_color_scheme); |