getElementById returns null on failure

This commit is contained in:
friendica 2013-07-21 18:44:24 -07:00
parent 400f3baee9
commit 168d7ae9fc

View File

@ -90,7 +90,7 @@ $(document).ready(function(){
var doctitle = document.title; var doctitle = document.title;
function checkNotify() { function checkNotify() {
var notifyUpdateElem = document.getElementById('notify-update'); var notifyUpdateElem = document.getElementById('notify-update');
if(typeof(notifyUpdateElem) != 'undefined') { if(notifyUpdateElem !== null) {
if(notifyUpdateElem.innerHTML != "") if(notifyUpdateElem.innerHTML != "")
document.title = "("+notifyUpdateElem.innerHTML+") " + doctitle; document.title = "("+notifyUpdateElem.innerHTML+") " + doctitle;
else else