Skip to content

Commit

Permalink
handle null chat input element
Browse files Browse the repository at this point in the history
  • Loading branch information
night committed Jan 25, 2023
1 parent 4e027fd commit bec8e6c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export default function useChatInputPartialEmote(chatInputElement, getChatInputP
event.stopPropagation();
}

chatInputElement.addEventListener('input', handleInput);
chatInputElement?.addEventListener('input', handleInput);

return () => {
chatInputElement.removeEventListener('input', handleInput);
chatInputElement?.removeEventListener('input', handleInput);
};
}, [getChatInputPartialEmote, chatInputElement]);

Expand Down

0 comments on commit bec8e6c

Please sign in to comment.