Fixing genre remove from the filter menu

This commit is contained in:
Zoe Roux 2020-09-16 19:22:11 +02:00
parent fad6bda758
commit be02aa552f

View File

@ -18,7 +18,7 @@
<mat-chip *ngFor="let genre of this.genres" <mat-chip *ngFor="let genre of this.genres"
[color]="this.filters.genres.includes(genre) ? 'accent' : 'default'" selected [color]="this.filters.genres.includes(genre) ? 'accent' : 'default'" selected
(click)="this.filters.genres.includes(genre) (click)="this.filters.genres.includes(genre)
? this.filters.genres.pop(genre) ? this.filters.genres.splice(this.filters.genres.indexOf(genre), 1)
: this.filters.genres.push(genre)"> : this.filters.genres.push(genre)">
{{genre.name}} {{genre.name}}
</mat-chip> </mat-chip>