imp_select_view isn't always present on the page
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 20 Dec 2009 17:29:18 +0000 (12:29 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 20 Dec 2009 17:29:18 +0000 (12:29 -0500)
imp/js/login.js

index a5352af..03198e9 100644 (file)
@@ -23,8 +23,11 @@ var ImpLogin = {
     onDomLoad: function()
     {
         /* Activate dynamic view. */
-        var s = $('imp_select_view'),
-            o = s.down('option[value=dimp]').show();
+        var s = $('imp_select_view');
+        if (!s) {
+            return;
+        }
+        o = s.down('option[value=dimp]').show();
         if (this.dimp_sel) {
             s.selectedIndex = o.index;
         }