Skip to content

Commit

Permalink
Add guard rail to dropdown keyhandler
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhlauke authored and GeoSot committed Feb 3, 2023
1 parent c735b2e commit cedd335
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/src/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ class Dropdown extends BaseComponent {
SelectorEngine.next(this, SELECTOR_DATA_TOGGLE)[0] ||
SelectorEngine.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode))

if (getToggleButton === null) {
return
}

const instance = Dropdown.getOrCreateInstance(getToggleButton)

if (isUpOrDownEvent) {
Expand Down

0 comments on commit cedd335

Please sign in to comment.