mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-31 11:35:37 +01:00
Fix saving null profiles
This commit is contained in:
parent
7dc1c9f7ab
commit
4c4477098d
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user