Skip to content

Commit d8c1af1

Browse files
committed
fix: shouldExcludeFromA11yTree runs in IE11
IE11 returns `undefined` for missing `parentElement`.
1 parent a401bb5 commit d8c1af1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/role-helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function shouldExcludeFromA11yTree(element) {
2626
let visibility = computedStyle.visibility
2727

2828
let currentElement = element
29-
while (currentElement !== null) {
29+
while (currentElement) {
3030
if (currentElement.hidden === true) {
3131
return true
3232
}

0 commit comments

Comments
 (0)