[dw-free] JS error "randomicon is null" when commenting anonymously
[commit: http://hg.dwscoalition.org/dw-free/rev/df0e44320be3]
http://bugs.dwscoalition.org/show_bug.cgi?id=3115
Double-check that the element exists.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3115
Double-check that the element exists.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- htdocs/js/talkpost.js
-------------------------------------------------------------------------------- diff -r d6718902899b -r df0e44320be3 htdocs/js/talkpost.js --- a/htdocs/js/talkpost.js Wed Nov 17 15:16:34 2010 +0800 +++ b/htdocs/js/talkpost.js Wed Nov 17 15:25:38 2010 +0800 @@ -231,7 +231,8 @@ function subjectIconChange(icon) { function showRandomIcon() { var randomicon = document.getElementById("randomicon"); - randomicon.setAttribute("class", "randomicon"); + if (randomicon) + randomicon.setAttribute("class", "randomicon"); } function randomicon() { --------------------------------------------------------------------------------
no subject
no subject