mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 18:42:21 +01:00
Replace shift shit with array filter
Co-Authored-By: Olaf Slomp <git@oslomp.nl>
This commit is contained in:
@ -463,12 +463,11 @@
|
||||
toggle_details(song) {
|
||||
if (!this.show_details(song)) {
|
||||
this.songs_show_details_on_mobile.push(song.id);
|
||||
}
|
||||
else {
|
||||
const index = this.songs_show_details_on_mobile.indexOf(song.id);
|
||||
if (index > -1) {
|
||||
this.songs_show_details_on_mobile.splice(index, 1);
|
||||
}
|
||||
} else {
|
||||
// Deze filter is gehaat door Kees, gemaakt door Olaf. Bedankt, Olaf. Duurde wel even.
|
||||
this.songs_show_details_on_mobile = this.songs_show_details_on_mobile.filter(
|
||||
value => value !== song.id
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user