1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: fix empty events when no features need to be deleted (#7181)

This commit is contained in:
Jaanus Sellin 2024-05-28 11:32:20 +03:00 committed by GitHub
parent 2c7a654860
commit 83912d872b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1951,6 +1951,11 @@ class FeatureToggleService {
const eligibleFeatureNames = eligibleFeatures.map(
(toggle) => toggle.name,
);
if (eligibleFeatures.length === 0) {
return;
}
const tags = await this.tagStore.getAllByFeatures(eligibleFeatureNames);
await this.featureToggleStore.batchDelete(eligibleFeatureNames);