aboutsummaryrefslogtreecommitdiffstats
path: root/src/event.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2016-06-02 18:33:47 -0400
committerDave Methvin <dave.methvin@gmail.com>2016-06-02 20:56:47 -0400
commit2df590e4ecfb8874b1deaca26d3c4cc2b7f7b140 (patch)
tree9855287c2d0612312a3ece6c507821f32c33f81c /src/event.js
parent73bf35ecf31867d7ed4662374121efa310cf9f8d (diff)
downloadjquery-2df590e4ecfb8874b1deaca26d3c4cc2b7f7b140.tar.gz
jquery-2df590e4ecfb8874b1deaca26d3c4cc2b7f7b140.zip
Event: Allow constructing a jQuery.Event without a target
Fixes gh-3139 Closes gh-3140
Diffstat (limited to 'src/event.js')
-rw-r--r--src/event.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event.js b/src/event.js
index ff0ab8493..d64b9b6cb 100644
--- a/src/event.js
+++ b/src/event.js
@@ -527,7 +527,7 @@ jQuery.Event = function( src, props ) {
// Create target properties
// Support: Safari <=6 - 7 only
// Target should not be a text node (#504, #13143)
- this.target = ( src.target.nodeType === 3 ) ?
+ this.target = ( src.target && src.target.nodeType === 3 ) ?
src.target.parentNode :
src.target;