Skip to content

Commit 839c067

Browse files
committed
Merge branch 'HIRANO-Satoshi-patch-2' into v2-dev
2 parents a6bea3d + b4173fc commit 839c067

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dropdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export class Dropdown extends Component<DropdownOptions> implements Openable {
321321
else if (Utils.keys.ENTER.includes(e.key) && this.isOpen) {
322322
// Search for <a> and <button>
323323
const focusedElement = this.dropdownEl.children[this.focusedIndex];
324-
const activatableElement = <HTMLElement>focusedElement.querySelector('a, button');
324+
const activatableElement = <HTMLElement>focusedElement?.querySelector('a, button');
325325
// Click a or button tag if exists, otherwise click li tag
326326
if (!!activatableElement) {
327327
activatableElement.click();

0 commit comments

Comments
 (0)