Skip to content

Commit 34bb817

Browse files
committed
page: artist-alias: don't overshadow a normal artist page
1 parent d533d2e commit 34bb817

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/page/artist-alias.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export function targets({wikiData}) {
44
return wikiData.artistData.filter(artist => artist.isAlias);
55
}
66

7-
export function pathsForTarget(aliasArtist) {
7+
export function pathsForTarget(aliasArtist, {wikiData: {artistData}}) {
88
const {aliasedArtist} = aliasArtist;
99

1010
// Don't generate a redirect page if this aliased name resolves to the same
@@ -13,6 +13,14 @@ export function pathsForTarget(aliasArtist) {
1313
return [];
1414
}
1515

16+
// And don't generate a redirect page if this aliased name resolves to the
17+
// same directory as any *other, non-alias* artist. In that case we really
18+
// just need the page (at this directory) to lead to the actual artist with
19+
// this directory - not be a redirect. See issue #543.
20+
if (artistData.some(artist => artist.directory === aliasArtist.directory)) {
21+
return [];
22+
}
23+
1624
return [
1725
{
1826
type: 'redirect',

0 commit comments

Comments
 (0)