From 737820118b0af9c9e0d077481f0630f0f279a2c8 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Thu, 22 Sep 2011 11:12:42 -0400 Subject: [PATCH] More reference caching --- src/event.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/event.js b/src/event.js index a9bf19706..379dc7906 100644 --- a/src/event.js +++ b/src/event.js @@ -413,8 +413,10 @@ jQuery.event = { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event || window.event ); - if ( jQuery.event.propHooks[ event.type ] ) { - event = jQuery.event.propHooks[ event.type ]( event ); + var propHook = jQuery.event.propHooks[ event.type ]; + + if ( propHook ) { + event = propHook( event ); } var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []), -- 2.39.5