Skip to content

Commit

Permalink
Update utils.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dzx-dzx authored Feb 3, 2024
1 parent 64c0c47 commit 2a3274c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/v2/thepaper/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = {
title: contentDetail.name || contentDetail.shareName,
link: itemUrl,
description,
category: [...(contentDetail.tagList?.map((t) => t.tag) ?? []), ...(contentDetail?.nodeInfo?.name ?? [])],
category: [].concat(contentDetail.tagList?.map((t) => t.tag) ?? [], contentDetail?.nodeInfo?.name ?? []),

Check warning

Code scanning / ESLint

Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`. Warning

Prefer the spread operator over Array#concat(…).
pubDate: parseDate(item.pubTimeLong || contentDetail.pubTime || contentDetail.publishTime),
author: contentDetail.author || '',
media: {
Expand Down

0 comments on commit 2a3274c

Please sign in to comment.