dead end redirects

This commit is contained in:
v 2018-07-17 17:43:36 +03:00
parent c090ba9028
commit 3e121a30c3

View File

@ -933,8 +933,8 @@ function batchRedirects ( pageInfos ) {
let rdr
for ( let from = item.title; target == null; from = rdr.to ) {
rdr = redirectsByFrom[ from ]
if ( rdr.tointerwiki != null || rdr.to == item.title )
return null // interwiki or circular redirection
if ( ! rdr || rdr.tointerwiki != null || rdr.to == item.title )
return null // dead end, interwiki or circular redirection
target = targetsByTitle[ rdr.to ]
}
if ( target.missing != null )