File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -170,9 +170,9 @@ export function useScroll(
170
170
return
171
171
172
172
const el = (
173
- target === window
173
+ ( target as Window ) . document
174
174
? ( target as Window ) . document . documentElement
175
- : target === window . document ? ( target as Document ) . documentElement : target
175
+ : ( target as Document ) . documentElement ?? target
176
176
) as HTMLElement
177
177
178
178
const { display, flexDirection } = getComputedStyle ( el )
@@ -233,7 +233,7 @@ export function useScroll(
233
233
return
234
234
235
235
const eventTarget = (
236
- e . target === window . document ? ( e . target as Document ) . documentElement : e . target
236
+ ( e . target as Document ) . documentElement ?? e . target
237
237
) as HTMLElement
238
238
239
239
setArrivedState ( eventTarget )
You can’t perform that action at this time.
0 commit comments