File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/framer-motion/src/render/dom/scroll/offsets Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,7 @@ export function calcInset(element: Element, container: HTMLElement) {
2020 const parentBoundingBox = current . getBoundingClientRect ( )
2121 inset . x += svgBoundingBox . left - parentBoundingBox . left
2222 inset . y += svgBoundingBox . top - parentBoundingBox . top
23- } else if (
24- current instanceof SVGGraphicsElement &&
25- "getBBox" in current
26- ) {
23+ } else if ( current instanceof SVGGraphicsElement ) {
2724 const { x, y } = current . getBBox ( )
2825 inset . x += x
2926 inset . y += y
@@ -37,6 +34,8 @@ export function calcInset(element: Element, container: HTMLElement) {
3734 parent = current . parentNode as SVGElement
3835 }
3936 current = svg
37+ } else {
38+ break
4039 }
4140 }
4241
You can’t perform that action at this time.
0 commit comments