From 59ee3eff17d99aadf64a7e35c2b168afbab6e690 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 15 Jun 2023 14:31:31 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/org.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/org.js b/src/utils/org.js index dd6cd563f..730b7dd64 100644 --- a/src/utils/org.js +++ b/src/utils/org.js @@ -35,7 +35,10 @@ async function changeOrg(org, reload = true, vm = null) { } // 替换 Path 中的 UUID const idRegex = /\/?([a-fA-F0-9]{8}-(?:[a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12})|(-?\d+(\.\d+)?)\/?/ - path = path.replace(idRegex, '') + const i = path.search(idRegex) + if (i !== -1) { + path = path.slice(0, i + 1) + } // 替换 Query 中的 UUID const newQuery = {}