From 3c36c5aab699c3940dc4f1d0cf5437c82c5a3179 Mon Sep 17 00:00:00 2001 From: Lyunvy <64697357+Lyunvy@users.noreply.github.com> Date: Thu, 3 Oct 2024 07:10:41 +0800 Subject: [PATCH] use toArray instead. --- lib/routes/xbookcn/blog.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/xbookcn/blog.ts b/lib/routes/xbookcn/blog.ts index 25ab801cb6ab38..ff02b3318e4367 100644 --- a/lib/routes/xbookcn/blog.ts +++ b/lib/routes/xbookcn/blog.ts @@ -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; // 返回带有描述和分类的文章对象