[PM-14241] Checking if Timber tree has been added before trying to remove it (#4194)

This commit is contained in:
aj-rosado 2024-10-30 13:12:20 +01:00 committed by GitHub
parent 1c10a94109
commit d71389ab02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,7 @@ class LogsManagerImpl(
}
if (value) {
Timber.plant(nonfatalErrorTree)
} else {
} else if (Timber.forest().contains(nonfatalErrorTree)) {
Timber.uproot(nonfatalErrorTree)
}
}