fix: incorrect regex when splitting artistName (#2378)

Fixes the incorrect regex used to split a string in the form of `Name1 & Name2` or `Name1, Name2`.

Previously the regex was actually splitting on `Name1 &, Name2`...
This commit is contained in:
Angelos Bouklis
2024-08-29 01:48:18 +03:00
committed by GitHub
parent e165e64952
commit 61eb28e780

View File

@ -126,8 +126,8 @@ export const getLyricsList = async (
const { artist } = songData;
const { artistName } = item;
const artists = artist.split(/&,/).map((i) => i.trim());
const itemArtists = artistName.split(/&,/).map((i) => i.trim());
const artists = artist.split(/[&,]/g).map((i) => i.trim());
const itemArtists = artistName.split(/[&,]/g).map((i) => i.trim());
const permutations = [];
for (const artistA of artists) {