fix: switch language will add tab

This commit is contained in:
scarqin 2022-09-13 14:18:28 +08:00
parent 2d737e558f
commit 489c4a9c44

View File

@ -52,11 +52,13 @@ export class ApiTabOperateService {
//Tab from url
try {
//If current url did't match exist tab,throw error
this.generateTabFromUrl(this.router.url);
this.operateTabAfterRouteChange({
url: this.router.url,
});
return;
const existTab = this.getSameContentTab(this.generateTabFromUrl(this.router.url));
if (existTab) {
this.operateTabAfterRouteChange({
url: this.router.url,
});
return;
}
} catch (e) {
console.error(e);
}