You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/07/29 07:40:00 UTC
svn commit: r426762 - /incubator/xap/trunk/src/xap/xml/dom/XapElement.js
Author: mturyn
Date: Sat Jul 29 00:39:59 2006
New Revision: 426762
URL: http://svn.apache.org/viewvc?rev=426762&view=rev
Log:
Added test for a listener's existence before using it.
Modified:
incubator/xap/trunk/src/xap/xml/dom/XapElement.js
Modified: incubator/xap/trunk/src/xap/xml/dom/XapElement.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/dom/XapElement.js?rev=426762&r1=426761&r2=426762&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/xml/dom/XapElement.js (original)
+++ incubator/xap/trunk/src/xap/xml/dom/XapElement.js Sat Jul 29 00:39:59 2006
@@ -941,7 +941,9 @@
var listener = listeners[i];
//TODO check for existence?
- listener[methodName].call(listener, event);
+ if(listener[methodName]){
+ listener[methodName].call(listener, event);
+ }
if ( listeners[i] != listener ) {
i = i - 1;