Skip to content

Commit

Permalink
Merge pull request #59 from JamesBrill/bugfix-race-between-reset-and-…
Browse files Browse the repository at this point in the history
…stop

Stop resetTranscript from overriding stopListening
  • Loading branch information
JamesBrill authored Aug 21, 2020
2 parents af3d083 + b83f0b0 commit 4de0d15
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-speech-recognition",
"version": "3.2.0",
"version": "3.2.1",
"description": "💬Speech recognition for your React app",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/RecognitionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default class RecognitionManager {
}

disconnect(disconnectType) {
if (this.browserSupportsSpeechRecognition) {
if (this.browserSupportsSpeechRecognition && this.listening) {
switch (disconnectType) {
case 'ABORT':
this.pauseAfterDisconnect = true
Expand Down

0 comments on commit 4de0d15

Please sign in to comment.