File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export function targets({wikiData}) {
4
4
return wikiData . artistData . filter ( artist => artist . isAlias ) ;
5
5
}
6
6
7
- export function pathsForTarget ( aliasArtist ) {
7
+ export function pathsForTarget ( aliasArtist , { wikiData : { artistData } } ) {
8
8
const { aliasedArtist} = aliasArtist ;
9
9
10
10
// Don't generate a redirect page if this aliased name resolves to the same
@@ -13,6 +13,14 @@ export function pathsForTarget(aliasArtist) {
13
13
return [ ] ;
14
14
}
15
15
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
+
16
24
return [
17
25
{
18
26
type : 'redirect' ,
You can’t perform that action at this time.
0 commit comments