diff --git a/src/components/VoiceRecorder.vue b/src/components/VoiceRecorder.vue index d1633ef..acd4251 100644 --- a/src/components/VoiceRecorder.vue +++ b/src/components/VoiceRecorder.vue @@ -349,9 +349,11 @@ export default { }); }, cancelRecording() { - this.state = State.INITIAL; - this.recorder.stop(); - this.recorder = null; + if(this.recorder) { + this.state = State.INITIAL; + this.recorder.stop(); + this.recorder = null; + } this.close(); }, pauseRecording() {