about summary refs log tree commit diff
path: root/src/lib/routes
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/routes')
-rw-r--r--src/lib/routes/links.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/routes/links.ts b/src/lib/routes/links.ts
index 397a5916c..538f30cd3 100644
--- a/src/lib/routes/links.ts
+++ b/src/lib/routes/links.ts
@@ -7,11 +7,11 @@ export function makeProfileLink(
   },
   ...segments: string[]
 ) {
-  return [
-    `/profile`,
-    `${isInvalidHandle(info.handle) ? info.did : info.handle}`,
-    ...segments,
-  ].join('/')
+  let handleSegment = info.did
+  if (info.handle && !isInvalidHandle(info.handle)) {
+    handleSegment = info.handle
+  }
+  return [`/profile`, handleSegment, ...segments].join('/')
 }
 
 export function makeCustomFeedLink(