Skip to content

Commit

Permalink
Remove unnecessary undefined checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
goodov committed Aug 19, 2024
1 parent 708123f commit 0b273a5
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/seed_tools/utils/study_validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,12 @@ function checkExperiments(study: Study): string[] {

// Validate features.
if (experiment.feature_association !== undefined) {
if (
experiment.feature_association.enable_feature !== undefined &&
experiment.feature_association.enable_feature.length > 0
) {
if (experiment.feature_association.enable_feature.length > 0) {
for (const feature of experiment.feature_association.enable_feature) {
checkFeatureName(experiment, feature, errors);
}
}
if (
experiment.feature_association.disable_feature !== undefined &&
experiment.feature_association.disable_feature.length > 0
) {
if (experiment.feature_association.disable_feature.length > 0) {
for (const feature of experiment.feature_association.disable_feature) {
checkFeatureName(experiment, feature, errors);
}
Expand Down

0 comments on commit 0b273a5

Please sign in to comment.