pari: branch 2.0 r3986 - /branches/2.0/config/js/astman.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Oct 21 10:31:56 CDT 2008


Author: pari
Date: Tue Oct 21 10:31:56 2008
New Revision: 3986

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3986
Log:

 Avoid calling getElementById twice



Modified:
    branches/2.0/config/js/astman.js

Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=3986&r1=3985&r2=3986
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Tue Oct 21 10:31:56 2008
@@ -22,10 +22,9 @@
 
 _$ = function(x){
 	if ( typeof x != 'string' ){ return null ;}
-	if(document.getElementById(x)){
+	try{
 		return document.getElementById(x); 
-	}
-	return null;
+	}catch(err){ return null; }
 };
 
 // Some custom methods to Array Objects




More information about the asterisk-gui-commits mailing list