bkruse: branch 2.0 r3926 - /branches/2.0/config/js/astman.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Sep 30 17:42:30 CDT 2008


Author: bkruse
Date: Tue Sep 30 17:42:30 2008
New Revision: 3926

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3926
Log:
Ok, we should make sure that the line in the macro
exists before trying to parse it and erroring out.

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=3926&r1=3925&r2=3926
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Tue Sep 30 17:42:30 2008
@@ -1775,6 +1775,9 @@
 		parseTrunkDialArgument: function(y){ // usage ASTGUI.parseContextLine.parseTrunkDialArgument(y)
 			// expects y as  '${trunk_1}/XXX${EXTEN:X}' OR SIP/user/XXX${EXTEN:X}
 			var WhatToDial = '';
+			if (!y) {
+				return null;
+			}
 			y = y.trim();
 			if( y.beginsWith('${') && y.afterChar('}').beginsWith('/') ) {
 				var trunkname = y.betweenXY('{' , '}');




More information about the asterisk-gui-commits mailing list