Skip to content

Commit 079e17d

Browse files
committed
make sure there is an event to persist
1 parent 9797fae commit 079e17d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Mentions.tsx

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

0 commit comments

Comments
 (0)