From deeed2068bbb8f907c4c9b2a5d3c1a7c865e3306 Mon Sep 17 00:00:00 2001 From: AiraNadih <128119996+AiraNadih@users.noreply.github.com> Date: Thu, 6 Feb 2025 21:47:27 +0800 Subject: [PATCH] fix(route/kemono): fix items parsing logic (#18291) --- lib/routes/kemono/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/kemono/index.ts b/lib/routes/kemono/index.ts index 50a593fde..7f307de79 100644 --- a/lib/routes/kemono/index.ts +++ b/lib/routes/kemono/index.ts @@ -97,7 +97,8 @@ async function handler(ctx) { const author = isPosts ? '' : await getAuthor(currentUrl, headers); title = isPosts ? 'Kemono Posts' : `Posts of ${author} from ${source} | Kemono`; image = isPosts ? `${rootUrl}/favicon.ico` : `https://img.kemono.su/icons/${source}/${id}`; - items = response.data + const responseData = isPosts ? response.data.posts : response.data; + items = responseData .filter((i) => i.content || i.attachments) .slice(0, limit) .map((i) => {