Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Jul 3, 2018
2 parents 997e84d + a619be2 commit f378b56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ export default class Trigger extends React.Component {
}
this.preClickTime = 0;
this.preTouchTime = 0;
event.preventDefault();
if (event && event.preventDefault) {
event.preventDefault();
}
const nextVisible = !this.state.popupVisible;
if (this.isClickToHide() && !nextVisible || nextVisible && this.isClickToShow()) {
this.setPopupVisible(!this.state.popupVisible, event);
Expand Down

0 comments on commit f378b56

Please sign in to comment.