@@ -236,7 +236,7 @@ export class FightListComponent extends RbacBasedComponent implements OnInit, On
236236 //Corrected selected items
237237 if ( this . selectedFight ) {
238238 for ( const _group of this . groups ) {
239- if ( _group . fights . indexOf ( this . selectedFight ) ) {
239+ if ( _group . fights . indexOf ( this . selectedFight ) >= 0 ) {
240240 selectedFightIndex = _group . fights . indexOf ( this . selectedFight ) ;
241241 }
242242 }
@@ -247,10 +247,10 @@ export class FightListComponent extends RbacBasedComponent implements OnInit, On
247247 this . groups . splice ( groupIndex , 1 , group ) ;
248248 this . selectedGroup = this . groups [ groupIndex ] ;
249249 this . resetFilter ( ) ;
250- if ( this . selectedGroup && this . selectedFight && selectedFightIndex ) {
250+ if ( this . selectedGroup && this . selectedFight && selectedFightIndex !== undefined ) {
251251 this . selectFight ( this . filteredFights . get ( this . selectedGroup . id ! ) ! [ selectedFightIndex ] ) ;
252252 } else {
253- this . selectFight ( undefined ) ;
253+ this . selectFight ( this . selectedFight ) ;
254254 }
255255 if ( this . selectedFight && selectedDuelIndex && this . selectedFight ?. duels [ selectedDuelIndex ] ) {
256256 this . selectDuel ( this . selectedFight . duels [ selectedDuelIndex ] ) ;
@@ -595,7 +595,7 @@ export class FightListComponent extends RbacBasedComponent implements OnInit, On
595595 selectFight ( fight : Fight | undefined ) : void {
596596 this . selectedFight = fight ;
597597 if ( fight ) {
598- this . selectedGroup = this . groups . find ( ( group : Group ) : boolean => group . fights . indexOf ( fight ) >= 0 ) ! ;
598+ this . selectedGroup = this . groups . find ( group => group . fights . indexOf ( fight ) >= 0 ) ;
599599 } else {
600600 this . selectedGroup = undefined ;
601601 }
0 commit comments