Skip to content

Commit 228cef7

Browse files
committed
fix(home): handle startRecognition failure in restartRecognition
1 parent 7e79317 commit 228cef7

File tree

1 file changed

+3
-1
lines changed
  • apps/sim/app/workspace/[workspaceId]/home/components/user-input

1 file changed

+3
-1
lines changed

apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,9 @@ export function UserInput({
551551
prefixRef.current = newPrefix
552552
recognitionRef.current.abort()
553553
recognitionRef.current = null
554-
startRecognition()
554+
if (!startRecognition()) {
555+
setIsListening(false)
556+
}
555557
},
556558
[startRecognition]
557559
)

0 commit comments

Comments
 (0)