Skip to content

Commit

Permalink
fix config is null
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanho committed Mar 8, 2024
1 parent 6fed3bc commit fb5d4c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"node": true
},
"globals": {
"config": true,
"Log": true,
"MM": true,
"Module": true,
Expand Down
10 changes: 5 additions & 5 deletions node_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
/**
Expand Down

0 comments on commit fb5d4c5

Please sign in to comment.