Skip to content

Commit

Permalink
Fix:Unable to properly open workflows-details page
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-J committed Dec 26, 2023
1 parent 81c7055 commit 4aba3b1
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion src/newtab/pages/Workflows.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,31 @@ onMounted(() => {
state.activeTab = activeTab || tabs[0].id;
}
if (state.tabs.length !== 0) return;
if (state.tabs.length !== 0) {
if (/\/workflows\/.+/.test(route.path)) {
const routeTab = state.tabs.find((tab) => tab.path === route.path);
if (routeTab) {
if (routeTab.id !== state.activeTab) {
state.activeTab = routeTab.id;
}
} else {
const index = state.tabs.findIndex((tab) => tab.id === state.activeTab);
if (index !== -1) {
Object.assign(state.tabs[index], {
path: route.path,
name: getTabTitle(),
});
setTimeout(() => {
Object.assign(state.tabs[index], {
name: getTabTitle(),
});
}, 1000);
}
}
}
return;
}
addTab({
path: route.path,
Expand Down

0 comments on commit 4aba3b1

Please sign in to comment.