Skip to content

Commit

Permalink
chore(voiceSearch): assign an empty string if no transcript
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunjae Lee committed May 15, 2019
1 parent e2717c1 commit 9788d81
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/voiceSearchHelper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ export default function voiceSearchHelper({
setState({
status: STATUS_RECOGNIZING,
transcript:
event.results[0] &&
event.results[0][0] &&
event.results[0][0].transcript,
(event.results[0] &&
event.results[0][0] &&
event.results[0][0].transcript) ||
'',
isSpeechFinal: event.results[0] && event.results[0].isFinal,
});
if (searchAsYouSpeak && state.transcript) {
Expand Down

0 comments on commit 9788d81

Please sign in to comment.