Skip to content

Commit

Permalink
Be explicit with element.closest()'s return value
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Dec 6, 2020
1 parent d8f2473 commit 4eea630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class Dropdown extends BaseComponent {
}

_detectNavbar() {
return Boolean(this._element.closest(`.${CLASS_NAME_NAVBAR}`))
return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null
}

_getPopperConfig() {
Expand Down

0 comments on commit 4eea630

Please sign in to comment.