From 72e54a00e88adc38897e6d8ad1617257cee05dfc Mon Sep 17 00:00:00 2001 From: redhoodsu Date: Thu, 29 Aug 2024 21:37:59 +0800 Subject: [PATCH] release: v1.12.3 --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/target/config.ts | 5 ++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d472ca7d..177d1f22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.12.3 (29 Aug 2024) + +* fix: target.js cdn attribute + ## 1.12.2 (29 Aug 2024) * fix: firefox elements panel diff --git a/package.json b/package.json index 263358bd..89b564b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chii", - "version": "1.12.2", + "version": "1.12.3", "description": "Chrome devtools framework", "main": "./server/index.js", "bin": { diff --git a/src/target/config.ts b/src/target/config.ts index c1f22c8d..0c377525 100644 --- a/src/target/config.ts +++ b/src/target/config.ts @@ -41,11 +41,10 @@ if (element) { rtc = true; } cdn = element.getAttribute('cdn') || ''; - cdn = rtrim(cdn, '/'); } -if (cdn && !endWith(cdn, '/')) { - cdn += '/'; +if (cdn && endWith(cdn, '/')) { + cdn = rtrim(cdn, '/'); } const sessionStore = safeStorage('session');