Skip to content

Commit 245f1fe

Browse files
committed
Update custom flow snippet from changeset
1 parent 05e3043 commit 245f1fe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.changeset/rich-donuts-agree.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ It's useful for handling pending session tasks for after-auth flows:
1111
await clerk.setActive({
1212
session,
1313
navigate: async ({ session }) => {
14-
if (session.currentTask.key === 'choose-organization') {
14+
const currentTask = session.currentTask;
15+
16+
if (currentTask) {
1517
await router.push('/onboarding/choose-organization')
18+
return;
1619
}
20+
21+
await navigate('/dashboard')
1722
}
1823
});
1924
```

0 commit comments

Comments
 (0)