mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix a bug with splice
This commit is contained in:
@ -241,7 +241,8 @@ async function createConnectionProfile(forceName = null) {
|
||||
if (excludeState) {
|
||||
profile.exclude.push(keyName);
|
||||
} else {
|
||||
profile.exclude.splice(profile.exclude.indexOf(keyName), 1);
|
||||
const index = profile.exclude.indexOf(keyName);
|
||||
index !== -1 && profile.exclude.splice(index, 1);
|
||||
}
|
||||
});
|
||||
const isNameTaken = (n) => extension_settings.connectionManager.profiles.some(p => p.name === n);
|
||||
|
Reference in New Issue
Block a user