Skip to content

Commit

Permalink
FIX (portal): safe access classList
Browse files Browse the repository at this point in the history
  • Loading branch information
sanusart committed Feb 19, 2019
1 parent 345754c commit 91f17de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,11 @@ export class Select extends Component {
dropDown = (action = 'toggle', event) => {
if (
this.props.portal &&
event &&
event.srcElement &&
!this.props.closeOnScroll &&
!this.props.closeOnSelect &&
event &&
event.srcElement &&
event.srcElement.offsetParent &&
event.srcElement.offsetParent.classList.contains('react-dropdown-select-dropdown')
) {
return;
Expand Down

0 comments on commit 91f17de

Please sign in to comment.