diff options
Diffstat (limited to 'modules/ChatReplay')
| -rw-r--r-- | modules/ChatReplay/ChatReplay.tsx | 3 | ||||
| -rw-r--r-- | modules/ChatReplay/parser/index.ts | 1 |
2 files changed, 3 insertions, 1 deletions
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<T>( const ChatReplay = (props: ChatReplayProps) => { const { replayData, currentTimeSeconds } = props; - const [messages, setMessages] = React.useState<ChatMessage[]>([]); + const [messages, setMessages] = React.useState<ChatMessage[]>([]) 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; }; |
