diff --git a/public/scripts/extensions/connection-manager/index.js b/public/scripts/extensions/connection-manager/index.js index d5f3882bf..f3b3898d2 100644 --- a/public/scripts/extensions/connection-manager/index.js +++ b/public/scripts/extensions/connection-manager/index.js @@ -110,7 +110,7 @@ async function createConnectionProfile() { const name = await callGenericPopup(template, POPUP_TYPE.INPUT, suggestedName, { rows: 2 }); if (!name) { - return; + return null; } profile.name = name; @@ -296,6 +296,9 @@ async function renderDetailsContent(details, detailsContent) { const createButton = document.getElementById('create_connection_profile'); createButton.addEventListener('click', async () => { const profile = await createConnectionProfile(); + if (!profile) { + return; + } extension_settings.connectionManager.profiles.push(profile); extension_settings.connectionManager.selectedProfile = profile.id; saveSettingsDebounced();