fix 未配置集群地址时无法切换工作空间

pre commit 2.10.42.6
This commit is contained in:
bwcx_jzy 2023-08-23 16:39:04 +08:00
parent fa2b4ce5d8
commit 91dbdd5dc2
No known key found for this signature in database
GPG Key ID: E187D6E9DDDE8C53

View File

@ -773,7 +773,7 @@ export default {
const cluster = this.myClusterList.find((item2) => {
return item2.id === item.clusterInfoId;
});
if (cluster && item.url && location.href.indexOf(cluster.url) !== 0) {
if (cluster && cluster.url && location.href.indexOf(cluster.url) !== 0) {
let url = `${cluster.url}/#/${this.$route.fullPath}`.replace(/[\\/]+[\\/]/g, "/").replace(":/", "://");
url = url.replace(`wid=${this.selectWorkspace.id}`, `wid=${item.id}`);
// console.log(location.href.indexOf(cluster.url), url);