From 43db2dadc14ce667582397e6357efb68b9c007cb Mon Sep 17 00:00:00 2001 From: caelum0x Date: Sun, 6 Sep 2026 12:13:48 +0300 Subject: [PATCH] fix(web): guard null talent graph in collaborate share-link handler handleCopyShareLink read graph.profile.username, but graph is TalentGraph|null. The render-level early return does not narrow graph inside the callback closure, so tsc reported TS18047 (possibly null) and a null graph would throw at runtime. Optional-chain the guard so the handler no-ops until the graph has loaded. Co-Authored-By: Claude Fable 5 --- gitgram/web/app/collaborate/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitgram/web/app/collaborate/page.tsx b/gitgram/web/app/collaborate/page.tsx index 12656616..c5e78e54 100644 --- a/gitgram/web/app/collaborate/page.tsx +++ b/gitgram/web/app/collaborate/page.tsx @@ -178,7 +178,7 @@ export default function CollaboratePage() { } const handleCopyShareLink = async () => { - if (!graph.profile.username) return + if (!graph?.profile.username) return try { const url = new URL('/collaborate', window.location.origin)