mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
fix: fix empty events when no features need to be deleted (#7181)
This commit is contained in:
parent
2c7a654860
commit
83912d872b
@ -1951,6 +1951,11 @@ class FeatureToggleService {
|
|||||||
const eligibleFeatureNames = eligibleFeatures.map(
|
const eligibleFeatureNames = eligibleFeatures.map(
|
||||||
(toggle) => toggle.name,
|
(toggle) => toggle.name,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (eligibleFeatures.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const tags = await this.tagStore.getAllByFeatures(eligibleFeatureNames);
|
const tags = await this.tagStore.getAllByFeatures(eligibleFeatureNames);
|
||||||
await this.featureToggleStore.batchDelete(eligibleFeatureNames);
|
await this.featureToggleStore.batchDelete(eligibleFeatureNames);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user