fix delete show song and not deleted order song causes crash

This commit is contained in:
2025-02-16 12:24:38 +01:00
parent 2d38af1c27
commit 83573fde31
2 changed files with 10 additions and 7 deletions

View File

@@ -213,7 +213,7 @@ export class DocxService {
sections: Section[];
}
);
const songs = show.order.map(_ => songsLoaded.filter(f => f.showSong.id === _)[0]);
const songs = show.order.map(_ => songsLoaded.find(f => f.showSong.id === _)).filter(_ => !!_);
return {songs, show, user, config};
}