We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8107c6a commit ed2b747Copy full SHA for ed2b747
1 file changed
resources/js/utils/useOrganization.ts
@@ -12,6 +12,10 @@ import { getCurrentOrganizationId } from '@/utils/useUser';
12
import { api } from '@/packages/api/src';
13
14
export function switchOrganization(organizationId: string) {
15
+ // Clear Inertia's prefetch cache to prevent stale pages from the old
16
+ // organization being served when navigating after the switch.
17
+ router.flushAll();
18
+
19
router.put(
20
route('current-team.update'),
21
{
0 commit comments