Skip to content
This repository was archived by the owner on Sep 22, 2022. It is now read-only.

Commit ea1422d

Browse files
committed
fix shadowed variable
1 parent 229d2b9 commit ea1422d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ type Focusable =
1212
| HTMLElement
1313

1414
function autofocus(el: DetailsDialogElement): void {
15-
let autofocus = el.querySelector('[autofocus]')
16-
if (!autofocus) {
17-
autofocus = el
15+
let autofocusElement = el.querySelector('[autofocus]')
16+
if (!autofocusElement) {
17+
autofocusElement = el
1818
el.setAttribute('tabindex', '-1')
1919
}
20-
autofocus.focus()
20+
autofocusElement.focus()
2121
}
2222

2323
function keydown(event: KeyboardEvent): void {

0 commit comments

Comments
 (0)