fix song sorting in docx

This commit is contained in:
2021-07-04 20:17:41 +02:00
parent 62cc092b95
commit 1605be82a3
4 changed files with 5 additions and 4 deletions

View File

@@ -199,7 +199,8 @@ export class DocxService {
sections,
};
});
const songs = (await Promise.all(songsAsync)).filter(_ => !!_).map(_ => _ as {showSong: ShowSong; song: Song; sections: Section[]});
const songsLoaded = (await Promise.all(songsAsync)).filter(_ => !!_).map(_ => _ as {showSong: ShowSong; sections: Section[]});
const songs = show.order.map(_ => songsLoaded.filter(f => f.showSong.id === _)[0]);
return {songs, show, user, config};
}