From 9b1a5b8d26f93c58cf78b95487ce3d0cf80be01f Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Sat, 23 Oct 2021 17:18:58 +0300 Subject: [PATCH] clarify var names in cleanupName() --- providers/song-info.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/providers/song-info.js b/providers/song-info.js index f88d4103..3f4ad435 100644 --- a/providers/song-info.js +++ b/providers/song-info.js @@ -107,15 +107,15 @@ const suffixesToRemove = [ " (clip officiel)", ]; -function cleanupName(artist) { - if (!artist) return artist; - const lowerCaseArtist = artist.toLowerCase(); +function cleanupName(name) { + if (!name) return name; + const lowCaseName = name.toLowerCase(); for (const suffix of suffixesToRemove) { - if (lowerCaseArtist.endsWith(suffix)) { - return artist.slice(0, -suffix.length); + if (lowCaseName.endsWith(suffix)) { + return name.slice(0, -suffix.length); } } - return artist; + return name; } module.exports = registerCallback;