wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r17707: LJSUP-7355: js error when open page http...

Committer: wisest-owl
LJSUP-7355: js error when open page http://www.livejournal.com/customize/

U   trunk/cgi-bin/LJ/Widget/ThemeChooser.pm
Modified: trunk/cgi-bin/LJ/Widget/ThemeChooser.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/ThemeChooser.pm	2010-11-17 07:01:55 UTC (rev 17706)
+++ trunk/cgi-bin/LJ/Widget/ThemeChooser.pm	2010-11-17 07:29:45 UTC (rev 17707)
@@ -388,8 +388,12 @@
             });
 
             // add event listener to the page and show dropdowns
-            DOM.addEventListener($('page_dropdown_top'), "change", function (evt) { Customize.ThemeNav.filterThemes(evt, "page", $('page_dropdown_top').value) });
-            DOM.addEventListener($('page_dropdown_bottom'), "change", function (evt) { Customize.ThemeNav.filterThemes(evt, "page", $('page_dropdown_bottom').value) });
+            if( $( 'page_dropdown_top' ) ) {
+                DOM.addEventListener($('page_dropdown_top'), "change", function (evt) { Customize.ThemeNav.filterThemes(evt, "page", $('page_dropdown_top').value) });
+            }
+            if( $( 'page_dropdown_bottom' ) ) {
+                DOM.addEventListener($('page_dropdown_bottom'), "change", function (evt) { Customize.ThemeNav.filterThemes(evt, "page", $('page_dropdown_bottom').value) });
+            }
             DOM.addEventListener($('show_dropdown_top'), "change", function (evt) { Customize.ThemeNav.filterThemes(evt, "show", $('show_dropdown_top').value) });
             DOM.addEventListener($('show_dropdown_bottom'), "change", function (evt) { Customize.ThemeNav.filterThemes(evt, "show", $('show_dropdown_bottom').value) });
         },

Tags: livejournal, pm, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments