]> source.dussan.org Git - jquery.git/commitdiff
Event: remove redundant guards for the event methods
authorOleg Gaidarenko <markelog@gmail.com>
Mon, 27 Apr 2015 06:57:46 +0000 (09:57 +0300)
committerOleg Gaidarenko <markelog@gmail.com>
Sun, 3 May 2015 10:56:32 +0000 (13:56 +0300)
Fixes gh-2047
Closes gh-2125

src/event.js

index 1a721a95945eff80bc889c031c2d3b40db2b8baa..b371b9a272ccb267361ca31c1c3ea54062a9e5c3 100644 (file)
@@ -688,7 +688,7 @@ jQuery.Event.prototype = {
 
                this.isDefaultPrevented = returnTrue;
 
-               if ( e && e.preventDefault ) {
+               if ( e ) {
                        e.preventDefault();
                }
        },
@@ -697,7 +697,7 @@ jQuery.Event.prototype = {
 
                this.isPropagationStopped = returnTrue;
 
-               if ( e && e.stopPropagation ) {
+               if ( e ) {
                        e.stopPropagation();
                }
        },
@@ -706,7 +706,7 @@ jQuery.Event.prototype = {
 
                this.isImmediatePropagationStopped = returnTrue;
 
-               if ( e && e.stopImmediatePropagation ) {
+               if ( e ) {
                        e.stopImmediatePropagation();
                }