File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/core/useIntersectionObserver Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export interface UseIntersectionObserverOptions extends ConfigurableWindow {
1919 /**
2020 * The Element or Document whose bounds are used as the bounding box when testing for intersection.
2121 */
22- root ?: MaybeComputedElementRef
22+ root ?: MaybeComputedElementRef | Document
2323
2424 /**
2525 * A string which specifies a set of offsets to add to the root's bounding_box when calculating intersections.
@@ -70,7 +70,7 @@ export function useIntersectionObserver(
7070
7171 const stopWatch = isSupported . value
7272 ? watch (
73- ( ) => [ targets . value , unrefElement ( root ) , isActive . value ] as const ,
73+ ( ) => [ targets . value , unrefElement ( root as MaybeComputedElementRef ) , isActive . value ] as const ,
7474 ( [ targets , root ] ) => {
7575 cleanup ( )
7676 if ( ! isActive . value )
You can’t perform that action at this time.
0 commit comments