Fix a bug with splice
| @@ -241,7 +241,8 @@ async function createConnectionProfile(forceName = null) { | ||
| 241 | 241 | if (excludeState) { |
| 242 | 242 | profile.exclude.push(keyName); |
| 243 | 243 | } else { |
| 244 | 244 | profile.exclude.splice(const index = profile.exclude.indexOf(keyName), 1); |
| 245 | + index !== -1 && profile.exclude.splice(index, 1); | |
| 245 | 246 | } |
| 246 | 247 | }); |
| 247 | 248 | const isNameTaken = (n) => extension_settings.connectionManager.profiles.some(p => p.name === n); |