Skip to content

Commit

Permalink
change function
Browse files Browse the repository at this point in the history
  • Loading branch information
Derekmini committed Nov 23, 2024
1 parent 322a2c7 commit f4c309e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/routes/ieee/author.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ async function handler(ctx) {
title: $.text(),
link: item.htmlLink,
doi: item.doi,
authors: Object.hasOwn(item, 'authors') ? item.authors.map((itemAuth) => itemAuth.preferredName).join('; ') : 'Do not have author',
abstract: Object.hasOwn(item, 'abstract') ? item.abstract : '',
authors: 'authors' in item ? item.authors.map((itemAuth) => itemAuth.preferredName).join('; ') : 'Do not have author',
abstract: 'abstract' in item ? item.abstract : '',
};
});

Expand Down

0 comments on commit f4c309e

Please sign in to comment.