diff --git a/source/ts/utilities/release.ts b/source/ts/utilities/release.ts index 910d997..aad61ec 100644 --- a/source/ts/utilities/release.ts +++ b/source/ts/utilities/release.ts @@ -50,8 +50,9 @@ export default class Release { ? `https://coverartarchive.org/release/${mbid}/front-500` : undefined; - const links = data.relations - .map(({url}) => new RelationLink(url.resource)) + const relations = new Set(data.relations.map(({url}) => url.resource)); + const links = Array.from(relations) + .map((url) => new RelationLink(url)) .sort((a, b) => a.text.localeCompare(b.text)); return new Release({