From 4fca5cec7483fe0c2cf8b672cfa6055391c8aced Mon Sep 17 00:00:00 2001 From: Redhair Hambagu Date: Sun, 27 Jul 2025 10:14:55 +0000 Subject: [PATCH 1/2] fix: APlayer url update --- components/Player.js | 2 +- conf/widget.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Player.js b/components/Player.js index 91fef339..11adef01 100644 --- a/components/Player.js +++ b/components/Player.js @@ -64,7 +64,7 @@ const Player = () => { {meting ? ( Date: Sun, 27 Jul 2025 21:01:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=AF=BC=E8=87=B4=E7=AB=99=E7=82=B9=E5=B4=A9?= =?UTF-8?q?=E6=BA=83=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/mapImage.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/notion/mapImage.js b/lib/notion/mapImage.js index 85ed4e30..bd816954 100644 --- a/lib/notion/mapImage.js +++ b/lib/notion/mapImage.js @@ -119,10 +119,19 @@ const compressImage = (image, width, quality = 50, fmt = 'webp') => { width = siteConfig('IMAGE_COMPRESS_WIDTH') } - // 将URL解析为一个对象 - const urlObj = new URL(image) - // 获取URL参数 - const params = new URLSearchParams(urlObj.search) + + let urlObj + let params + try { + // 将URL解析为一个对象 + urlObj = new URL(image) + // 获取URL参数 + params = new URLSearchParams(urlObj.search) + } catch (err) { + // 捕获异常并打印错误的url + console.error('compressImage: Invalid URL:', image, err) + return image + } // Notion图床 if (