From 34e7bf9bb0a6922e091c7394891a413b7c48dd6e Mon Sep 17 00:00:00 2001 From: 0t4u <61939142+0t4u@users.noreply.github.com> Date: Mon, 5 Dec 2022 20:58:53 +0000 Subject: update deps --- modules/ChatReplay/ChatReplay.tsx | 3 ++- modules/ChatReplay/parser/index.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/ChatReplay') diff --git a/modules/ChatReplay/ChatReplay.tsx b/modules/ChatReplay/ChatReplay.tsx index b18b68b..af129e5 100644 --- a/modules/ChatReplay/ChatReplay.tsx +++ b/modules/ChatReplay/ChatReplay.tsx @@ -29,9 +29,10 @@ function bsearch( const ChatReplay = (props: ChatReplayProps) => { const { replayData, currentTimeSeconds } = props; - const [messages, setMessages] = React.useState([]); + const [messages, setMessages] = React.useState([]) React.useEffect(() => { + if (!replayData) return; /** * Find the current replayData index where * time_in_seconds <= currentTimeSeconds diff --git a/modules/ChatReplay/parser/index.ts b/modules/ChatReplay/parser/index.ts index d921603..bdc193d 100644 --- a/modules/ChatReplay/parser/index.ts +++ b/modules/ChatReplay/parser/index.ts @@ -28,5 +28,6 @@ export const parseChatReplay = (input: string) => { console.log("[chat] using", parser.name); const parsed = parser.parse(); console.log("[chat] found", parsed.length, "messages"); + console.log(parsed) return parsed; }; -- cgit v1.2.3