diff --git a/src/renderer/features/albums/components/joined-artists.tsx b/src/renderer/features/albums/components/joined-artists.tsx index 74256c214..712716065 100644 --- a/src/renderer/features/albums/components/joined-artists.tsx +++ b/src/renderer/features/albums/components/joined-artists.tsx @@ -36,6 +36,10 @@ export const JoinedArtists = ({ for (const artist of artists) { const name = artist.name; + + // Avoid an infinite loop when `artist.name` is an empty string. + if (!name) continue; + const regex = new RegExp(escapeRegex(name), 'gi'); let match: null | RegExpExecArray = null; while ((match = regex.exec(artistName)) !== null) {