Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(share): always serve desktop bundle for share routes (#15710)

Innei7633c0e83f80
diff --git a/src/libs/next/proxy/define-config.ts b/src/libs/next/proxy/define-config.ts
index ba348056525..74564c56f2e 100644
--- a/src/libs/next/proxy/define-config.ts
+++ b/src/libs/next/proxy/define-config.ts
@@ -66,9 +66,13 @@ export function defineConfig() {
locale,
});
+ // Share pages are responsive on their own; always serve the desktop bundle
+ // so mobile UA does not land on mobile-specific routes.
+ const isSharePath = url.pathname === '/share' || url.pathname.startsWith('/share/');
+
// 2. Create normalized preference values
const route = RouteVariants.serializeVariants({
- isMobile: device.type === 'mobile',
+ isMobile: !isSharePath && device.type === 'mobile',
locale,
});