Skip to content

Commit

Permalink
make sure there is an event to persist
Browse files Browse the repository at this point in the history
  • Loading branch information
triptate committed May 14, 2020
1 parent dea5aaa commit 3dba017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mentions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class Mentions extends React.Component<MentionsProps, MentionsState> {
public onBlur = (event?: React.FocusEvent<HTMLTextAreaElement>) => {
// the timeout causes onBlur to be called async, which causes the react synthetic
// event to be nullified. persist it if possible so clients can use it.
if (event.persist) {
if (event && event.persist) {
event.persist();
}
this.focusId = window.setTimeout(() => {
Expand Down

0 comments on commit 3dba017

Please sign in to comment.