fix error when quoted post doesn't exist

This commit is contained in:
James Campos 2011-05-22 10:01:59 -07:00
parent 3c1ca5c302
commit e4b65e6dad
2 changed files with 7 additions and 2 deletions

View File

@ -1843,7 +1843,11 @@
return _results;
},
mouseout: function() {
return $.removeClass(d.getElementById(this.hash.slice(1)), 'qphl');
var el;
if (!(el = d.getElementById(this.hash.slice(1)))) {
return;
}
return $.removeClass(el, 'qphl');
},
mouseover: function(e) {
var el, id, qp, quote, replyID, req, threadID, _i, _len, _ref;

View File

@ -1465,7 +1465,8 @@ quotePreview =
$.bind quote, 'mouseout', ui.hoverend
$.bind quote, 'mouseout', quotePreview.mouseout
mouseout: ->
$.removeClass d.getElementById(@hash[1..]), 'qphl'
return unless el = d.getElementById @hash[1..]
$.removeClass el, 'qphl'
mouseover: (e) ->
return unless id = @hash[1..]
qp = $ '#qp'