1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-13 13:48:59 +02:00

fix: fix empty events when no features need to be deleted

This commit is contained in:
sjaanus 2024-05-28 11:27:36 +03:00
parent 3964ffdec8
commit c65baa9f0c
No known key found for this signature in database
GPG Key ID: 20E007C0248BA7FF

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);