diff --git a/src/components/VoiceRecorder.vue b/src/components/VoiceRecorder.vue index 8d7984b..93074b3 100644 --- a/src/components/VoiceRecorder.vue +++ b/src/components/VoiceRecorder.vue @@ -353,9 +353,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() {