diff --git a/src/static/js/contentcollector.js b/src/static/js/contentcollector.js index 245acc0c4..947b3a8d7 100644 --- a/src/static/js/contentcollector.js +++ b/src/static/js/contentcollector.js @@ -432,7 +432,7 @@ const makeContentCollector = function ( let styl = dom.nodeAttr(node, 'style'); let cls = dom.nodeAttr(node, 'class'); let isPre = (tname === 'pre'); - if ((!isPre) && abrowser.safari) { + if ((!isPre) && abrowser && abrowser.safari) { isPre = (styl && /\bwhite-space:\s*pre\b/i.exec(styl)); } if (isPre) cc.incrementFlag(state, 'preMode');