fix javascript warning if action isn't function
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 10 Oct 2009 23:10:27 +0000 (01:10 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 10 Oct 2009 23:10:27 +0000 (01:10 +0200)
www/jquery.sync.js

index b97074b..6b086e3 100644 (file)
     CustomEvent.prototype.setActive = function(isActive) {
         Event.prototype.setActive.call(this, isActive);
 
-        this.action(isActive, this.args);
+        if ( typeof this.action === 'function' ) this.action(isActive, this.args);
     }
 
     /**