mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-26 01:31:16 +00:00
Merge pull request #794 from ae-utbm/user-pictures-ajax
Better browser compatibility for user picture page
This commit is contained in:
commit
712615a312
@ -87,7 +87,13 @@
|
||||
|
||||
async init() {
|
||||
this.pictures = await this.get_pictures();
|
||||
this.albums = Object.groupBy(this.pictures, ({album}) => album);
|
||||
this.albums = this.pictures.reduce((acc, picture) => {
|
||||
if (!acc[picture.album]){
|
||||
acc[picture.album] = [];
|
||||
}
|
||||
acc[picture.album].push(picture);
|
||||
return acc;
|
||||
}, {});
|
||||
this.loading = false;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user