mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-07 15:48:46 +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 });
|
const name = await callGenericPopup(template, POPUP_TYPE.INPUT, suggestedName, { rows: 2 });
|
||||||
|
|
||||||
if (!name) {
|
if (!name) {
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
profile.name = name;
|
profile.name = name;
|
||||||
@ -296,6 +296,9 @@ async function renderDetailsContent(details, detailsContent) {
|
|||||||
const createButton = document.getElementById('create_connection_profile');
|
const createButton = document.getElementById('create_connection_profile');
|
||||||
createButton.addEventListener('click', async () => {
|
createButton.addEventListener('click', async () => {
|
||||||
const profile = await createConnectionProfile();
|
const profile = await createConnectionProfile();
|
||||||
|
if (!profile) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
extension_settings.connectionManager.profiles.push(profile);
|
extension_settings.connectionManager.profiles.push(profile);
|
||||||
extension_settings.connectionManager.selectedProfile = profile.id;
|
extension_settings.connectionManager.selectedProfile = profile.id;
|
||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user