Skip to content

Commit 0eab3e5

Browse files
committed
fix: code optimisation
1 parent 1c287d9 commit 0eab3e5

File tree

1 file changed

+4
-10
lines changed
  • apify-docs-theme/src/theme/LLMButtons

1 file changed

+4
-10
lines changed

apify-docs-theme/src/theme/LLMButtons/index.jsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ const openMcpIntegration = async (integration, mcpUrl) => {
227227
appUrl = `cursor://anysphere.cursor-deeplink/mcp/install?name=apify&config=${encodeURIComponent(encodedConfig)}`;
228228
} else if (integration === 'vscode') {
229229
// VS Code deeplink format: vscode:mcp/install?<url-encoded-json>
230-
// JSON structure: {"name":"Apify","type":"http","url":"<mcpUrl>"}
231230
const mcpConfig = {
232231
name: 'Apify',
233232
type: 'http',
@@ -238,16 +237,11 @@ const openMcpIntegration = async (integration, mcpUrl) => {
238237
}
239238

240239
if (appUrl) {
241-
try {
242-
window.open(appUrl, '_blank');
243-
} catch {
244-
// If deeplink fails, fallback to web configurator
245-
openApifyMcpConfigurator(integration);
246-
}
247-
} else {
248-
// Fallback to web configurator
249-
openApifyMcpConfigurator(integration);
240+
window.open(appUrl, '_blank');
241+
return;
250242
}
243+
// Fallback to web configurator
244+
openApifyMcpConfigurator(integration);
251245
};
252246

253247
const onConnectCursorClick = () => {

0 commit comments

Comments
 (0)