uls.lcd: Add auto-correcting code when index goes beyond max index
Leave the error logging code in place in order to identify any other places where this issue occurs. Bug: https://phabricator.wikimedia.org/T328956
This commit is contained in:
@@ -112,8 +112,15 @@
|
||||
if ( this.navigationIndex === null ) {
|
||||
this.navigationIndex = 0;
|
||||
} else {
|
||||
this.navigationIndex++;
|
||||
// Auto-correct the index. It has been noticed that the navigationIndex goes beyond the
|
||||
// max index sometimes. See: phab:T328956#8854835
|
||||
if ( this.navigationIndex > maxIndex ) {
|
||||
this.navigationIndex = maxIndex;
|
||||
} else {
|
||||
this.navigationIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
this.highlightLanguageOption();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user