Fix sending to embedded contact

This commit is contained in:
Fedor Indutny 2022-06-27 17:37:05 -07:00 committed by GitHub
parent bae3394efc
commit e0f479ca81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 6 deletions

View file

@ -564,8 +564,10 @@ export class Timeline extends React.Component<
public override componentDidMount(): void {
const containerEl = this.containerRef.current;
const messagesEl = this.messagesRef.current;
const { isConversationSelected } = this.props;
strictAssert(
containerEl && messagesEl,
// We don't render anything unless the conversation is selected
(containerEl && messagesEl) || !isConversationSelected,
'<Timeline> mounted without some refs'
);