Skip to content

Commit

Permalink
Conditional debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mnemitz committed Dec 4, 2024
1 parent 8c1a26a commit 75eb114
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/flow-client-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@speechmatics/flow-client-react",
"version": "0.1.2-rc3",
"version": "0.1.2-rc4",
"description": "React hooks for interacting with the Speechmatics Flow API",
"main": "dist/index.cjs",
"module": "dist/index.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/flow-client-react/src/use-flow-transcript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ type IncomingEvent =
export function messagesReducer(
oldMessages: ReadonlyArray<Message>,
event: IncomingEvent,
debug?: true,
) {
if (eventIsEmpty(event)) {
return oldMessages;
}

const messages = [...oldMessages];

debugString(event);
debug && debugString(event);

switch (event.message) {
case 'AddPartialTranscript':
Expand Down

0 comments on commit 75eb114

Please sign in to comment.