From 235fa1bc26cce49841b5e6149a0eab82eb1c0d97 Mon Sep 17 00:00:00 2001 From: Simon <10131203+gaomeng1900@users.noreply.github.com> Date: Mon, 15 Jun 2026 22:59:34 +0800 Subject: [PATCH] chore: fix lint error caused CI fail --- README.md | 4 ++-- docs/README-zh.md | 4 ++-- packages/website/src/hooks/useGitHubStars.ts | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fb72e34..dd776ca 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ Fastest way to try PageAgent with our free Demo LLM: > **⚠️ For technical evaluation only.** This demo CDN uses our free [testing LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api). By using it, you agree to its [terms](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md). -| Mirrors | URL | -| ------- | ---------------------------------------------------------------------------------- | +| Mirrors | URL | +| ------- | ----------------------------------------------------------------------------------- | | Global | https://cdn.jsdelivr.net/npm/page-agent@1.10.0/dist/iife/page-agent.demo.js | | China | https://registry.npmmirror.com/page-agent/1.10.0/files/dist/iife/page-agent.demo.js | diff --git a/docs/README-zh.md b/docs/README-zh.md index 26fd462..cd04ddf 100644 --- a/docs/README-zh.md +++ b/docs/README-zh.md @@ -49,8 +49,8 @@ https://github.com/user-attachments/assets/a1f2eae2-13fb-4aae-98cf-a3fc1620a6c2 > **⚠️ 仅用于技术评估。** 该 Demo CDN 使用了免费的[测试 LLM API](https://alibaba.github.io/page-agent/docs/features/models#free-testing-api),使用即表示您同意其[条款](https://github.com/alibaba/page-agent/blob/main/docs/terms-and-privacy.md)。 -| Mirrors | URL | -| ------- | ---------------------------------------------------------------------------------- | +| Mirrors | URL | +| ------- | ----------------------------------------------------------------------------------- | | Global | https://cdn.jsdelivr.net/npm/page-agent@1.10.0/dist/iife/page-agent.demo.js | | China | https://registry.npmmirror.com/page-agent/1.10.0/files/dist/iife/page-agent.demo.js | diff --git a/packages/website/src/hooks/useGitHubStars.ts b/packages/website/src/hooks/useGitHubStars.ts index 8b68e60..d5bd6e6 100644 --- a/packages/website/src/hooks/useGitHubStars.ts +++ b/packages/website/src/hooks/useGitHubStars.ts @@ -9,13 +9,15 @@ export function useGitHubStars() { useEffect(() => { if (cached !== null) return - fetch(STATS_URL) + const controller = new AbortController() + fetch(STATS_URL, { signal: controller.signal }) .then((r) => r.json()) .then((data) => { cached = data.stargazers_count ?? null setStars(cached) }) .catch(() => {}) + return () => controller.abort() }, []) return stars