From 66fda0dae550e87afe065e2eeb21152ea6ea1ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Godin?= Date: Tue, 11 Jun 2019 14:53:44 -0400 Subject: [PATCH] Fix undefined variable when naming recording file --- audio-recorder.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/audio-recorder.js b/audio-recorder.js index babd1d8..6fd7ae3 100644 --- a/audio-recorder.js +++ b/audio-recorder.js @@ -111,20 +111,20 @@ exports.AudioRecorder = class AudioRecorder extends EventEmitter { console.log(`Recorder ${this.index} started`) console.log(`Recorder ${this.index} was ${this.active} active`) - now = new Date() + let now = new Date() - dateString = "" + let dateString = "" dateString += now.getFullYear() + "-" dateString += (now.getMonth()+1) + "-" dateString += now.getDate() - timeString = "" + let timeString = "" timeString += now.getHours() + "-" timeString += now.getMinutes() + "-" timeString += now.getSeconds() + "-" timeString += now.getMilliseconds() - datetimeString = dateString + "_" + timeString + let datetimeString = dateString + "_" + timeString let filename = path.join(this.workspacePath, `ODAS_${id}_${datetimeString}_${this.suffix}.wav`) this.path = filename