Compare commits

..

1 Commits

Author SHA1 Message Date
Gregor Vostrak
ed2b7476ae clear inertia cache on organization change to fix wrongly loaded stale pages 2026-02-16 16:44:20 +01:00

View File

@@ -12,6 +12,10 @@ import { getCurrentOrganizationId } from '@/utils/useUser';
import { api } from '@/packages/api/src';
export function switchOrganization(organizationId: string) {
// Clear Inertia's prefetch cache to prevent stale pages from the old
// organization being served when navigating after the switch.
router.flushAll();
router.put(
route('current-team.update'),
{