Skip to content

Commit

Permalink
prevent assignment to entry in nil map
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof committed Feb 7, 2023
1 parent 9a4e74c commit 93bffd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/compose/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se
}

func flatten(in types.MappingWithEquals) types.Mapping {
out := types.Mapping{}
if len(in) == 0 {
return nil
return out
}
out := types.Mapping{}
for k, v := range in {
if v == nil {
continue
Expand Down

0 comments on commit 93bffd9

Please sign in to comment.