From: Timmy Willison Date: Tue, 16 Jun 2015 16:23:43 +0000 (-0400) Subject: Offset: no need to check for ownerDocument X-Git-Tag: 3.0.0-alpha1+compat~24 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=523de777f933d3f50cdf1fe7473a23a368aedcad;p=jquery.git Offset: no need to check for ownerDocument --- diff --git a/src/offset.js b/src/offset.js index 142c91893..b07bbe232 100644 --- a/src/offset.js +++ b/src/offset.js @@ -88,14 +88,14 @@ jQuery.fn.extend({ }); } - var docElem, win, rect, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; + var docElem, win, rect, doc, + elem = this[ 0 ]; - if ( !doc ) { + if ( !elem ) { return; } + doc = elem.ownerDocument; docElem = doc.documentElement; // Support: IE<=11+