Fix inverse condition in current profile deletion

This commit is contained in:
Davide De Rosa 2022-04-12 18:09:30 +02:00
parent ec3cca05ef
commit e663dbff11
1 changed files with 1 additions and 1 deletions

View File

@ -296,7 +296,7 @@ extension ProfileManager {
}
// IMPORTANT: invalidate current profile if deleted
if !currentProfile.value.isPlaceholder && newHeaders.keys.contains(currentProfile.value.id) {
if !currentProfile.value.isPlaceholder && !newHeaders.keys.contains(currentProfile.value.id) {
pp_log.info("\tCurrent profile deleted, invalidating...")
if isCurrentProfileActive() {
pp_log.info("\tCurrent profile was also active, deactivating...")