diff --git a/lib/session-file-store.js b/lib/session-file-store.js index fe0cfdb184..90be2bc871 100644 --- a/lib/session-file-store.js +++ b/lib/session-file-store.js @@ -11,12 +11,11 @@ class FileStore extends Store { } async set (sessionId, session, callback = noop) { - let storedSessionId try { // Delete any expired sessions before creating a new session const storedSessionFiles = await fse.readdir(this.path) await Promise.all(storedSessionFiles.map(async sessionFile => { - storedSessionId = sessionFile.replace('.json', '') + const storedSessionId = sessionFile.replace('.json', '') try { const storedSession = await fse.readJson(path.join(this.path, sessionFile)) if (isExpired(storedSession)) {