mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-10 04:22:06 +00:00
enable tsconfig strict mode & fix type errors
This commit is contained in:
@@ -58,9 +58,9 @@ async function generateCollectionEPub(
|
||||
collectionPosts: PostInfo[],
|
||||
fileLocation: string,
|
||||
) {
|
||||
const authors = collection.authors.map((id) => {
|
||||
return getUnicornById(id, collection.locale).name;
|
||||
});
|
||||
const authors = collection.authors
|
||||
.map((id) => getUnicornById(id, collection.locale)?.name)
|
||||
.filter((name): name is string => !!name);
|
||||
|
||||
const epub = new EPub(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user