mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
fix: don't fail if channel is null on reply
This commit is contained in:
@@ -18,7 +18,7 @@ import { SystemMessage } from "../SystemMessage";
|
||||
|
||||
interface Props {
|
||||
parent_mentions: string[];
|
||||
channel: Channel;
|
||||
channel?: Channel;
|
||||
index: number;
|
||||
id: string;
|
||||
}
|
||||
@@ -148,6 +148,8 @@ export const ReplyBase = styled.div<{
|
||||
|
||||
export const MessageReply = observer(
|
||||
({ index, channel, id, parent_mentions }: Props) => {
|
||||
if (!channel) return null;
|
||||
|
||||
const view = getRenderer(channel);
|
||||
if (view.state !== "RENDER") return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user