fix(ui): a workflow link isn't replaced before the list loads
This commit is contained in:
1 file changed
+4
@@ -115,6 +115,10 @@ watch(
|
||||
// it, and the chat's page context tells Archie which workflow is open.
|
||||
watch(selected, (id) => {
|
||||
if (!id || route.query.workflow === id) return;
|
||||
// A workflow named in the URL but not listed yet is still coming; the
|
||||
// stand-in selected meanwhile must not replace it.
|
||||
const wanted = route.query.workflow;
|
||||
if (typeof wanted === "string" && wanted !== applied && !rows.value.some((row) => row.id === wanted)) return;
|
||||
applied = id;
|
||||
void router.replace({ query: { ...route.query, workflow: id } });
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user