chore: eslint add sonar (#17989)
This commit is contained in:
parent
8f9cbe1c49
commit
d80f4c7d3b
38 changed files with 157 additions and 180 deletions
|
|
@ -196,7 +196,8 @@ const Chat: FC<ChatProps> = ({
|
|||
const chatContainer = chatContainerRef.current
|
||||
if (chatContainer) {
|
||||
const setUserScrolled = () => {
|
||||
if (chatContainer)
|
||||
// eslint-disable-next-line sonarjs/no-gratuitous-expressions
|
||||
if (chatContainer) // its in event callback, chatContainer may be null
|
||||
userScrolledRef.current = chatContainer.scrollHeight - chatContainer.scrollTop > chatContainer.clientHeight
|
||||
}
|
||||
chatContainer.addEventListener('scroll', setUserScrolled)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue