rem: if( EventsToSelect.length == 1 ) 
add: if( EventsToSelect && EventsToSelect.length == 1 ) 
context: function selectSelectedEventsInTree( EventsToSelect ){   if( doingSelection === true )      return;   doingSelection = true;   if( EventsToSelect === false )      EventsToSelect = gCalendarWindow.EventSelection.selectedEvents;   var SearchTree = document.getElementById( UnifinderTreeName );         /* The following is a brutal hack, caused by    http://lxr.mozilla.org/mozilla1.0/source/layout/xul/base/src/tree/src/nsTreeSelection.cpp#555   and described in bug 168211   http://bugzilla.mozilla.org/show_bug.cgi?id=168211   Do NOT remove anything in the next 3 lines, or the selection in the tree will not work.   */   SearchTree.onselect = null;   SearchTree.removeEventListener( "select", unifinderOnSelect, true );   SearchTree.view.selection.selectEventsSuppressed = true;   if( EventsToSelect.length == 1 )   {      var RowToScrollTo = SearchTree.eventView.getRowOfCalendarEvent( EventsToSelect[0] );               if( RowToScrollTo != "null" )      {         SearchTree.view.selection.clearSelection( );            SearchTree.treeBoxObject.ensureRowIsVisible( RowToScrollTo );         SearchTree.view.selection.timedSelect( RowToScrollTo, 1 );      }      else      {         SearchTree.view.selection.clearSelection( );      }   }   else if( EventsToSelect.length > 1 )   {      SearchTree.view.selection.clearSelection( );      for (var i in EventsToSelect) {         var row = SearchTree.eventView.getRowOfCalendarEvent(EventsToSelect[i]);         SearchTree.view.selection.rangedSelect(row,row,true);      }   }   else   {      SearchTree.view.selection.clearSelection( );   }      /* This needs to be in a setTimeout */   setTimeout( "resetAllowSelection()", 1 );}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/daf762c7fca63c377d255ff7e70b1b7a4b4cb141/unifinder.js/clean/calendar/resources/content/unifinder.js