Skip to content

Commit

Permalink
fix: enabled status checking (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Nov 22, 2023
1 parent d950ee0 commit 4b4106c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func (uc *Client) isParentDependencySatisfied(feature *api.Feature, context cont

enabledResult := uc.isEnabled(parent.Feature, WithContext(context))
// According to the schema, if the enabled property is absent we assume it's true.
if parent.Enabled == nil {
if parent.Enabled == nil || *parent.Enabled == true {
if parent.Variants != nil && len(*parent.Variants) > 0 && enabledResult.Variant != nil {
return enabledResult.Enabled && contains(*parent.Variants, enabledResult.Variant.Name)
}
Expand Down

0 comments on commit 4b4106c

Please sign in to comment.