File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -399,23 +399,21 @@ jQuery.event = {
399399 } ,
400400
401401 addProp : function ( name , hook ) {
402- var getter = jQuery . isFunction ( hook ) ?
403- function hookGetter ( ) {
404- if ( this . originalEvent ) {
405- return hook ( this . originalEvent ) ;
406- }
407- } :
408- function propGetter ( ) {
409- if ( this . originalEvent ) {
410- return this . originalEvent [ name ] ;
411- }
412- } ;
413-
414402 Object . defineProperty ( jQuery . Event . prototype , name , {
415403 enumerable : true ,
416404 configurable : true ,
417405
418- get : getter ,
406+ get : jQuery . isFunction ( hook ) ?
407+ function ( ) {
408+ if ( this . originalEvent ) {
409+ return hook ( this . originalEvent ) ;
410+ }
411+ } :
412+ function ( ) {
413+ if ( this . originalEvent ) {
414+ return this . originalEvent [ name ] ;
415+ }
416+ } ,
419417
420418 set : function ( value ) {
421419 Object . defineProperty ( this , name , {
You can’t perform that action at this time.
0 commit comments