From fb5d4c577bf529044a68f104f69aee7c6de56e6f Mon Sep 17 00:00:00 2001 From: Herman Ho Date: Fri, 8 Mar 2024 00:34:05 +0000 Subject: [PATCH] fix config is null --- .eslintrc.json | 1 - node_helper.js | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 2051959..d5b6c8b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,7 +16,6 @@ "node": true }, "globals": { - "config": true, "Log": true, "MM": true, "Module": true, diff --git a/node_helper.js b/node_helper.js index e776f5f..f97f2d5 100644 --- a/node_helper.js +++ b/node_helper.js @@ -245,17 +245,17 @@ module.exports = NodeHelper.create({ */ let albums = await this.getAlbums(); if (this.config.uploadAlbum) { - const uploadAlbum = albums.find((a) => a.title === config.uploadAlbum); + const uploadAlbum = albums.find((a) => a.title === this.config.uploadAlbum); if (uploadAlbum) { if (uploadAlbum.hasOwnProperty("shareInfo") && uploadAlbum.isWriteable) { - Log.info("Confirmed Uploadable album:", config.uploadAlbum, uploadAlbum.id); + Log.info("Confirmed Uploadable album:", this.config.uploadAlbum, uploadAlbum.id); this.uploadAlbumId = uploadAlbum.id; - this.sendSocketNotification("UPLOADABLE_ALBUM", config.uploadAlbum); + this.sendSocketNotification("UPLOADABLE_ALBUM", this.config.uploadAlbum); } else { - Log.error("This album is not uploadable:", config.uploadAlbum); + Log.error("This album is not uploadable:", this.config.uploadAlbum); } } else { - Log.error("Can't find uploadable album :", config.uploadAlbum); + Log.error("Can't find uploadable album :", this.config.uploadAlbum); } } /**