diff --git a/contrib/js/nntpchan/captcha-reload.js b/contrib/js/nntpchan/captcha-reload.js index b88a137..da4141b 100644 --- a/contrib/js/nntpchan/captcha-reload.js +++ b/contrib/js/nntpchan/captcha-reload.js @@ -14,7 +14,10 @@ function reload(el) { } onready(function(){ - document.getElementById("captcha_img").onclick = function() { - reload(document.getElementById("captcha_img")); - }; + var e = document.getElementById("captcha_img"); + if (e) { + e.onclick = function() { + reload(document.getElementById("captcha_img")); + }; + } });