Skip to content

Commit

Permalink
feat: flag for clone dependencies (#4922)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Oct 4, 2023
1 parent 2574144 commit bc650ff
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions src/lib/services/feature-toggle-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1260,17 +1260,22 @@ class FeatureToggleService {
}),
);

const cloneDependencies =
this.dependentFeaturesService.cloneDependencies(
{ featureName, newFeatureName, projectId },
userName,
);
if (this.flagResolver.isEnabled('dependentFeatures')) {
const cloneDependencies =
this.dependentFeaturesService.cloneDependencies(
{ featureName, newFeatureName, projectId },
userName,
);

await Promise.all([
...strategyTasks,
...variantTasks,
cloneDependencies,
]);
} else {
await Promise.all([...strategyTasks, ...variantTasks]);
}

await Promise.all([
...strategyTasks,
...variantTasks,
cloneDependencies,
]);
return created;
}

Expand Down

0 comments on commit bc650ff

Please sign in to comment.