Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: type error

Marc Seitz4ed4c9585c17
diff --git a/components/links/link-sheet/index.tsx b/components/links/link-sheet/index.tsx
index bdb53089..e478a743 100644
--- a/components/links/link-sheet/index.tsx
+++ b/components/links/link-sheet/index.tsx
@@ -334,7 +334,7 @@ export default function LinkSheet({
onClick={async (e) => {
e.stopPropagation();
e.preventDefault();
- await mutateGroups();
+ mutateGroups && (await mutateGroups());
}}
>
<RefreshCwIcon className="h-4 w-4" />
diff --git a/lib/swr/use-dataroom-groups.ts b/lib/swr/use-dataroom-groups.ts
index 309f8284..08d2accf 100644
--- a/lib/swr/use-dataroom-groups.ts
+++ b/lib/swr/use-dataroom-groups.ts
@@ -15,7 +15,8 @@ export default function useDataroomGroups() {
// if not on dataroom page, return
const router = useRouter();
const isDataroom = router.pathname.includes("datarooms");
- if (!isDataroom) return { viewerGroups: [], loading: false, error: null };
+ if (!isDataroom)
+ return { viewerGroups: [], loading: false, error: null, mutate: null };
const teamInfo = useTeam();
const { id } = router.query as {