diff options
| author | 0t4u <61939142+0t4u@users.noreply.github.com> | 2022-12-05 20:58:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-05 20:58:53 +0000 |
| commit | 34e7bf9bb0a6922e091c7394891a413b7c48dd6e (patch) | |
| tree | 4612b6e71857f7cdca87b5850d5f4e7b37e26a5f /modules | |
| parent | c6aa70a64731b608fade3acab48c1d1d2df280b6 (diff) | |
update deps
Diffstat (limited to 'modules')
| -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; }; |
