Null guard for clicking post area while loading
This commit is contained in:
parent
fcbf2c0c2b
commit
be7029942d
|
@ -3213,6 +3213,10 @@ $('body').on('keyup paste input', 'div.queet-box-syntax', function() {
|
||||||
currentVal = currentVal.replace(/<br>$/, '').replace(/ $/, '').replace(/ $/, ''); // fix
|
currentVal = currentVal.replace(/<br>$/, '').replace(/ $/, '').replace(/ $/, ''); // fix
|
||||||
$(this).siblings('.syntax-two').html(currentVal);
|
$(this).siblings('.syntax-two').html(currentVal);
|
||||||
|
|
||||||
|
// If user click post area before load finished (top gnu logo), this is undefined.
|
||||||
|
if (!window.syntaxHighlightingRegexps) {
|
||||||
|
window.syntaxHighlightingRegexps = Object();
|
||||||
|
}
|
||||||
|
|
||||||
// loop through the regexps and highlight
|
// loop through the regexps and highlight
|
||||||
$.each(window.syntaxHighlightingRegexps,function(k,v){
|
$.each(window.syntaxHighlightingRegexps,function(k,v){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user