This commit is contained in:
Vikhyath Mondreti
2025-06-27 16:36:07 -07:00
parent bbde2be093
commit 7c00f07d8f
2 changed files with 5 additions and 3 deletions

View File

@@ -863,7 +863,7 @@ const WorkflowContent = React.memo(() => {
logger.info(`Workflow ${currentId} not found, redirecting to first available workflow`)
// Validate that workflows belong to the current workspace before redirecting
const workspaceWorkflows = workflowIds.filter(id => {
const workspaceWorkflows = workflowIds.filter((id) => {
const workflow = workflows[id]
return workflow.workspaceId === workspaceId
})
@@ -880,7 +880,9 @@ const WorkflowContent = React.memo(() => {
// Validate that the current workflow belongs to the current workspace
const currentWorkflow = workflows[currentId]
if (currentWorkflow && currentWorkflow.workspaceId !== workspaceId) {
logger.warn(`Workflow ${currentId} belongs to workspace ${currentWorkflow.workspaceId}, not ${workspaceId}`)
logger.warn(
`Workflow ${currentId} belongs to workspace ${currentWorkflow.workspaceId}, not ${workspaceId}`
)
// Redirect to the correct workspace for this workflow
router.replace(`/workspace/${currentWorkflow.workspaceId}/w/${currentId}`)
return

View File

@@ -38,7 +38,7 @@ export default function WorkflowsPage() {
const workflowIds = Object.keys(workflows)
// Validate that workflows belong to the current workspace
const workspaceWorkflows = workflowIds.filter(id => {
const workspaceWorkflows = workflowIds.filter((id) => {
const workflow = workflows[id]
return workflow.workspaceId === workspaceId
})