diff --git a/src/utils/common.js b/src/utils/common.js index 70e04abbf..4c260272c 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -155,8 +155,12 @@ export function formatDate(inputTime) { const uuidPattern = /[0-9a-zA-Z\-]{36}/ -export function hasUUID(s) { - return s.search(uuidPattern) !== -1 +export function hasUUID(path) { + const index = path.indexOf('?') + if (index !== -1) { + path = path.substring(0, index) + } + return path.search(uuidPattern) !== -1 } export function replaceUUID(s, n) { diff --git a/src/utils/org.js b/src/utils/org.js index 4eb18ba71..6cd0a5d3d 100644 --- a/src/utils/org.js +++ b/src/utils/org.js @@ -26,6 +26,10 @@ async function changeOrg(org) { path = _.trimEnd(path, '/') location.href = path } else { + const index = path.indexOf('?') + if (index !== -1) { + location.href = path.substring(0, index) + } setTimeout(() => location.reload(), 400) } }