Fix IE8 reporting type object for `getBoundingClientRect`

This commit is contained in:
Heinrich Fenkart 2014-07-09 00:29:38 +02:00
parent 05ddea314c
commit 0268b41c4f
1 changed files with 1 additions and 1 deletions

View File

@ -321,7 +321,7 @@
var isBody = el.tagName == 'BODY'
var isSvg = window.SVGElement && el instanceof window.SVGElement
var elRect = typeof el.getBoundingClientRect == 'function' ? el.getBoundingClientRect() : null
var elRect = el.getBoundingClientRect ? el.getBoundingClientRect() : null
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isSvg ? {} : {