Skip to content

Commit 3dba017

Browse files
committed
make sure there is an event to persist
1 parent dea5aaa commit 3dba017

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Mentions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class Mentions extends React.Component<MentionsProps, MentionsState> {
245245
public onBlur = (event?: React.FocusEvent<HTMLTextAreaElement>) => {
246246
// the timeout causes onBlur to be called async, which causes the react synthetic
247247
// event to be nullified. persist it if possible so clients can use it.
248-
if (event.persist) {
248+
if (event && event.persist) {
249249
event.persist();
250250
}
251251
this.focusId = window.setTimeout(() => {

0 commit comments

Comments
 (0)