Skip to content

Commit

Permalink
Fix for #43, set cat on every value
Browse files Browse the repository at this point in the history
  • Loading branch information
bbredesen committed Apr 13, 2023
1 parent de27cce commit bbf399e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions feat/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,20 @@ func (f *Feature) FilterByCategory() map[def.TypeCategory]*Feature {

// Stuff all the values, segmented first by category then by type, into the new Feature
// Lots of maps to make...
for _, vr := range f.ResolvedValues {
for k, vr := range f.ResolvedValues {
_ = k
// Default category reset before starting the inner loop
cat := def.CatExten
cat := def.CatNone

for valName, valDef := range vr {
if valDef.ResolvedType() != nil {
cat = valDef.ResolvedType().Category()
} else {
cat = def.CatExten
}
tmp := rval[cat]
if tmp == nil {

_, found := rval[cat]
if !found {
rval[cat] = NewFeature()
}

Expand Down

0 comments on commit bbf399e

Please sign in to comment.