Skip to content

Commit 4cb1c91

Browse files
committed
suppress false positive TS18048
1 parent 03f1d25 commit 4cb1c91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useActive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export function useActive(userTargets: Targets, options: UseActiveOptions = def)
226226
if (firstInEl === targets.els[0]) {
227227
const firstTop = targets.top.values().next().value
228228

229-
if (sentinel + firstTop > offset + firstOffset) return (activeEl.v = null)
229+
if (firstTop && sentinel + firstTop > offset + firstOffset) return (activeEl.v = null)
230230
}
231231
}
232232

0 commit comments

Comments
 (0)