mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-04 14:30:29 +03:00
Fix crash if canMessage is false
This commit is contained in:
parent
623b2d1fd4
commit
af1a9cdf3a
1 changed files with 2 additions and 2 deletions
|
|
@ -103,10 +103,10 @@ export function RoomView({ room, eventId }: { room: Room; eventId?: string }) {
|
|||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (screenSize === ScreenSize.Desktop) {
|
||||
if (screenSize === ScreenSize.Desktop && canMessage) {
|
||||
ReactEditor.focus(editor);
|
||||
}
|
||||
}, [editor, screenSize]);
|
||||
}, [editor, screenSize, canMessage]);
|
||||
|
||||
return (
|
||||
<Page ref={roomViewRef}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue