Skip to content

Commit 043e211

Browse files
authored
fix PopChild logic with view transitions
Closes: #3165
1 parent a95e71a commit 043e211

File tree

1 file changed

+3
-1
lines changed
  • packages/framer-motion/src/components/AnimatePresence

1 file changed

+3
-1
lines changed

packages/framer-motion/src/components/AnimatePresence/PopChild.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ export function PopChild({ children, isPresent, anchorX }: Props) {
102102
}
103103

104104
return () => {
105-
document.head.removeChild(style)
105+
if (document.head.contains(style)) {
106+
document.head.removeChild(style)
107+
}
106108
}
107109
}, [isPresent])
108110

0 commit comments

Comments
 (0)