Skip to content

Commit

Permalink
fix(aria-hidden): skip empty elements hide (#2011)
Browse files Browse the repository at this point in the history
  • Loading branch information
healtheloper authored Nov 4, 2024
1 parent cbf5cfa commit 624da8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/utilities/aria-hidden/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function ariaHidden(targetsOrFn: TargetsOrFn, options: Options = {}) {
func(() => {
const targets = typeof targetsOrFn === "function" ? targetsOrFn() : targetsOrFn
const elements = targets.filter(Boolean) as HTMLElement[]
if (elements.length === 0) return
cleanups.push(hideOthers(elements))
}),
)
Expand Down

0 comments on commit 624da8d

Please sign in to comment.