Skip to content

Commit

Permalink
use toArray instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyunvy committed Oct 2, 2024
1 parent faf21ec commit 3c36c5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/routes/xbookcn/blog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export const route: Route = {

// 获取分类信息
const categories = $('.post-labels a')
.map((i, el) => $(el).text().trim())
.get();
.toArray()
.map((el) => $(el).text().trim());
item.category = categories; // 添加多个分类信息

return item; // 返回带有描述和分类的文章对象
Expand Down

0 comments on commit 3c36c5a

Please sign in to comment.