Skip to content

Commit

Permalink
yang991178#630 Add sanity fix for null titles when fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
germede committed Mar 22, 2024
1 parent 9fd12a9 commit 146f4a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/scripts/models/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export function fetchItemsIntermediate(): ItemActionTypes {

export async function insertItems(items: RSSItem[]): Promise<RSSItem[]> {
items.sort((a, b) => a.date.getTime() - b.date.getTime())
items.forEach(item => item.title = item.title == null ? '' : item.title)
const rows = items.map(item => db.items.createRow(item))
return (await db.itemsDB
.insert()
Expand Down

0 comments on commit 146f4a7

Please sign in to comment.