Skip to content

Commit

Permalink
Solved #49 (#50)
Browse files Browse the repository at this point in the history
* Update mapper.ts

* If item is undefined provide an empty list
  • Loading branch information
ShibaInu0413 authored May 26, 2023
1 parent af0fe9b commit 81b4c64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mappers/mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const mapRssToFeed = (rss: InternalRSS1): Feed => {
}));

return entry;
});
}) ?? [];

return result;
};
Expand Down Expand Up @@ -242,7 +242,7 @@ const mapRss2ToFeed = (rss: InternalRSS2): Feed => {
};
}

result.entries = items.map((item) => {
result.entries = items?.map((item) => {
const {
author,
title,
Expand Down Expand Up @@ -329,7 +329,7 @@ const mapRss2ToFeed = (rss: InternalRSS2): Feed => {
}));

return entry;
});
}) ?? [];

return (result as any);
};
Expand Down Expand Up @@ -505,7 +505,7 @@ const mapAtomToFeed = (atom: InternalAtom): Feed => {
}

return entry;
});
}) ?? [];

return result;
};
Expand Down

0 comments on commit 81b4c64

Please sign in to comment.